szabodanika / microbin

A secure, configurable file-sharing and URL shortening web app written in Rust.
https://microbin.eu
BSD 3-Clause "New" or "Revised" License
2.66k stars 167 forks source link

Does MICROBIN_EDITABLE=false do anything? #237

Open rmzg opened 11 months ago

rmzg commented 11 months ago

I want to disable editing/removing uploads, especially when shared to other people, without having to set a password every single time I upload, but nothing I try seems to work. I've tried setting MICROBIN_EDITABLE=false but it doesn't seem to change anything. Reading through the code, it looks like editable is just always set to true? I can't find any place where you actually read the editable environment variable.

https://github.com/szabodanika/microbin/blob/b8a0c5490d681550d982ad02d67a1aaa0897f503/src/endpoints/create.rs#L94

Virkkunen commented 11 months ago

It seems a lot of the variables don't do anything as of now, check #221 #229

rmzg commented 11 months ago

Those are via the compose file, I'm talking about after that step.

On Fri, Nov 3, 2023, 3:11 AM Fred Almeida @.***> wrote:

It seems a lot of the variables don't do anything as of now, check #221 https://github.com/szabodanika/microbin/issues/221 #229 https://github.com/szabodanika/microbin/pull/229

— Reply to this email directly, view it on GitHub https://github.com/szabodanika/microbin/issues/237#issuecomment-1792021948, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJZFZ5O7ECXVJL5UJA4AVDYCSRMRAVCNFSM6AAAAAA6ZAWAQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSGAZDCOJUHA . You are receiving this because you authored the thread.Message ID: @.***>

0815pascal commented 1 month ago

@rmzg What kind of environment are you deploying on? Assuming that you're talking about the variables set in a .env-file, you have to set them separately if deploying to fly.io for example. You then have to set MICROBIN_EDITABLE=false via CLI or the CI/CD-vendor's UI so as that it takes effect on the deployed version of your app.