Secure ini file

Hello i want to safe my passwords on a ini file.
But i want that it’s invisible from a browser window.
How can i fix this?

Hey user, thanks for using Glitch!


Utilize .env file instead of using .ini file to store your credentials, API keys, passwords, etc.

What is .env:

.env is a secure environment config section in your projects, useful for storing API keys and app credentials. Only invited collaborators are able to see the contents of your .env file. So anonymous viewers or logged-in users who haven’t been invited to your project can’t see them. When remixing an app the values are cleared so they’re not copied across.

Useful links:

1 Like

Avoiding the urge to talk about specifically passwords in a .ini file, it was said that the .data directory is also hidden from the editor and omitted in remixes. I’m not aware if there’s anything that makes it less private than .env.

1 Like

Hello there,
You’re right. However, there are a few differences between .data and .env:

  • First, .data is a directory, whereas .env is an environment variable file.
  • Second, .env variables can be accessed easily within the other files by Node: process.env.<VARIABLE_NAME>, whilst you cannot do the same with .data.
  • Third, you’ll have to create file within the .data folder, which contains the secrets, passwords, API keys etc. to get started.
  • Fourth, Once you’ve saved all the secrets to the file, created in .data folder, you’ll further have to require the file to each file, in which you’re going to use the secrets in, which makes it even more complicated.

Hope this helps and good luck!

1 Like

Thank you all for helping but I have found another solution

i use my .htaccess to forward to a ather page

gr Jurn