-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Not able to proxy requests for assets, media files #412
Comments
When you say the syntax is "wrong", how does the routing behaviour break/change? Can you give an example of requests that are being routed incorrectly as a result of this? |
Here is my use case:
I tested. When using Here is my server config, there is only one server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mysite;
root /usr/share/nginx/html/public;
# SSL
ssl_certificate /etc/nginx/ssl/mysite.pem;
ssl_certificate_key /etc/nginx/ssl/mysite-key.pem;
# security
include nginxconfig.io/security.conf;
# logging
access_log /var/log/nginx/access.log combined buffer=512k flush=1m;
error_log /var/log/nginx/error.log error;
# reverse proxy
location ^~ / {
resolver 127.0.0.11;
set $upstream_host my-app;
proxy_pass http://$upstream_host:50050;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
# additional config
include nginxconfig.io/general.conf;
} |
Ah I see, because |
Hm, I'm not sure updating the proxy location to be I wonder if there's a better way to apply those expirations while still allowing the proxy to work to catch all requests. |
Oh, I just realized that I have a few I see this in the doc:
That's why I can only find a way to proxy those asset files:
But I don't know what NGINXCONFIG can do in the existing preset. I think you might be able to add a new Reverse Proxy Presets for this. |
@MattIPv4 Maybe turn off expires settings when enable Reverse proxy is a good choice? |
I don't think disabling it would be the right move, as other domains in the tool might still be using it without a reverse proxy. I think the best move would be to add a warning to the expires section in the tool when any domain is using the reverse proxy -- we show warnings in a few other places in the tool so I think it makes sense to lean into a standard UI/UX convention here. With that warning in place, I'm fine with then switching the proxy block to using |
Information
https://whatismybrowser.com/w/MLNCGRF
Details
Description
Wrong:
Correct:
Steps to reproduce
Open this link
Expected behavior
I expected to have
^~
afterlocation
directive.See also: https://nginx.org/en/docs/http/ngx_http_core_module.html#location
Screenshots
The text was updated successfully, but these errors were encountered: