Are my files really public?

Hi there!

I am working on a project with a free acount at the time of writting. While using the free account, are my files really public? I am asking this because I would like to save a session id in order to avoid creating unnecessary requests. However, I have to save somewhere the session id, and I can’t save it as an ENV variable, as far as I know. I would have to save it on a json file maybe, but i understand that the gtlich project files are publicly available on the free plan, is that right?

How do I see my project files on an incongnito window? I just want to check if this is the case. How would you reccomend me saving an id session safely in this case?

Thanks in advance.

All files are public except the .env file, and you can save secret stuff in there. To see project files without logging in (incognito window), you can access project files by entering https://glitch.com/~/project-name.

To use the .env file, click the file with a key (that’s the .env file) and type whatever you want to keep safe there. Then, if you’re using Node.js, you can use process.env.name to get whatever secret you’re storing.


Hope that helped!

btw any files you store inside of a folder called .data (must be in project root) are also private

2 Likes

Yeah, so from what everyone is saying…

you can name a file .env and that instantly turns it into a “holder of secrets.” that way, you can add session ID’s and, even if someone remixes the project, they are only seen by you! :slight_smile:

.env would not be the place to put session IDs. you should put them in a file inside of .data — there they’re much easier to handle by node

@OnlyAHuman7926 thanks for your help.

The reason I was not seeing my .env file updated, was because I was not refreshing, by doing “refresh” on the console.

@tiago This is a great tip, thanks!

@MilesWK Thanks for your help. What are remixes for?

1 Like

Remixes are so you can make your own copy of the project by someone else with all the assets. This allows you to edit the code, and all sorts of stuff. However, ENV Vars are not included.

files inside of .data are not included too btw. .env is still included, just with all of the actual contants for each key removed. example: if your .env looks like this:

OPENAI_API_KEY=sk-rAm14bbzu38Jpf...
ANTHROPIC_API_KEY=sk-ant-api03-dw8z4oOajQZL0T...

it will get remixed as:

OPENAI_API_KEY=
ANTHROPIC_API_KEY=