-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: RewriteRule flag E is unsupported, #18
Comments
Yes, per the README this flag is unsupported - I looked into this awhile back and verified that nginx doesn't expose environmental variables in the same way that Apache does. |
Why just not set fastcgi_param HTTP_AUTHORIZATION "" or maybe doing a fastcgi_ignore_header HTTP_AUTHORIZATION?? |
@proginter you are welcome to submit code to this repository. According to my experience with Lua integration in nginx, this is not directly possible. |
While I'm not a fan of setting environment variables this way either, even if it was possible, this |
@rkaiser0324 maybe not in this particular case, but there are instances where env vars are dynamically set and used in the same htaccess file, so ignoring it breaks the intended behavior. I'm a big fan of letting the script fail if "standard" (expected) behavior cannot be met. Otherwise a parallel solution with numerous deviations is crafted, which defeats the whole purpose of this project. |
@e404 point taken regarding making the script fail if we cannot guarantee the same behavior. Can you describe how "setting and reading env vars via Lua and shell script" might work? |
@rkaiser0324 it is possible in Lua to directly execute shell commands. htaccess-for-nginx/htaccess.lua Line 169 in a62ee27
Using io.popen() , any environment variable can be output as well.This opens up several security concerns. Imagine, in a Docker environment there might be credentials stored in env variables, this is also a security flaw in Apache, though. Something like io.popen("echo ${VARIABLE_NAME}") should theoretically do it. When wrapped in a helper function, this can be used to process all env variables mentioned in the htaccess. Shell escaping should be performed to avoid arbitrary code execution.
Also, I'm not sure if in general environment variables are properly exposed to the session used by nginx/Lua and It would make sense to also implement |
any update on this issue? I have moved this to the nginx proxy fcgi, but native support would be nice.
|
I have this code and I am getting this error.
The text was updated successfully, but these errors were encountered: