ryanmab / CensorDodge

Censor Dodge Web Proxy
Creative Commons Attribution Share Alike 4.0 International
63 stars 67 forks source link

Allow to choose the cookieDIR location and/or to store them in a temporary directory #8

Closed mossroy closed 3 years ago

mossroy commented 3 years ago

Currently, the directory where the PHP files are stored must be writable. Because it's where the cookies need to be written. Else it throws an error "You need to have the file writing permissions enabled to use Censor Dodge".

It would be better to allow a different location to store cookies. It would allow to keep PHP files in a read-only location (in a docker image, for example). In most cases, I believe that /tmp could be a good place to store cookies (on linux, but https://www.php.net/manual/en/function.sys-get-temp-dir.php could be used to have the equivalent directory on any OS). It might be the default cookieDIR location, while allowing to override it?