Nginx: use prefixes instead of regexes#2913
Nginx: use prefixes instead of regexes#2913patrickelectric merged 1 commit intobluerobotics:masterfrom
Conversation
|
Note this also causes paths to the root to get normalized to I think this is a good thing because it prevents accidentally changed behavior between using an API with or without the proxy. In Root-relative URLs (e.g. |
|
The reasoning for this being done in #2815 is that nginx's redirects, when used behind another server (apache on a web server) was redirecting the browser to localhost. perhaps this can be fixed by setting the server with a variable passed from the proxying server... |
I think the actual issue was not the presence of the redirect but the fact that the Per the docs (Confusingly (to me, at least), URI here means the path name):
If you disagree with my assessment, what are the URLs and response headers you see in the problematic case (especially between Apache and nginx?) |
I do not disagree, but I need input from @voorloopnul who's on vacation right now. If so, we could revert for a while (at least) until he's available again. |
patrickelectric
left a comment
There was a problem hiding this comment.
I think that is safe for us to merge and see how it goes.
We can revert before stable 1.4 if necessary.
|
@rotu it appears that the PR broke master, can you take a look ? |
|
@patrickelectric Taking a look now. What are you looking at in particular? |
Frontend appears to be broken, api is not accessible and bootstrap is putting in factory mode. |
|
Turns out it did not like the leading colon in URLs. I was confused because |
Undo my introduction of invalid syntax in bluerobotics#2913, which breaks blueos. It turns out that you can't start a URL with a leading colon. The only reason I thought it gave the same results is because `service nginx reload` bailed when loading the new config, but left the server running with the same state.
Undo my introduction of invalid syntax in #2913, which breaks blueos. It turns out that you can't start a URL with a leading colon. The only reason I thought it gave the same results is because `service nginx reload` bailed when loading the new config, but left the server running with the same state.
|
Thanks for fixing it! |
Nginx supports full regex-based rules, but we don't actually need them
proxy_redirect.