Not able to proxy requests for assets, media files
See original GitHub issueInformation
https://whatismybrowser.com/w/MLNCGRF
Details
# reverse proxy
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
Description
Wrong:
# reverse proxy
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
Correct:
# reverse proxy
location ^~ / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
Steps to reproduce
Open this link
Expected behavior
I expected to have ^~
after location
directive.
# reverse proxy
location ^~ / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
See also: https://nginx.org/en/docs/http/ngx_http_core_module.html#location
In versions from 0.7.1 to 0.8.41, if a request matched the prefix location without the “=” and “^~” modifiers, the search also terminated and regular expressions were not checked.
Screenshots
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Proxying assets - GitLab Docs
GitLab can be configured to use an asset proxy server when requesting external images/videos/audio in issues and comments. This helps ensure that malicious ......
Read more >A Reverse Proxy Server Turns a Media Asset Database Into A ...
I want the files kept locally, secured using local equipment I own and maintain, and where I can control who can access the...
Read more >Images not loading when using nginx proxy manager #452
A simple reverse proxy wont fix this, at least not for the media files. That is why the nginx container is included in...
Read more >Could not proxy request /pusher/auth from localhost:3000 to ...
I confirm that using localhost as a proxy host is a problem on Mac. Using 127.0.0.1 fixed the issue for me. – Tim....
Read more >Assets proxy development | Adobe Experience Manager
Learn how to configure an Experience Manager proxy, ... IDS proxy worker uses an Adobe InDesign Server to process files for use in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
^~
, as I believe this was probably the intended behaviour all along. As that’s then a regex operator, I believe it’ll take precedence over the expiration blocks further down in the config, 'cause the logic for regex blocks is just the first matching block in the config?@MattIPv4 Maybe turn off expires settings when enable Reverse proxy is a good choice?