nginx: 302 the "/" path to "/cgi-bin/luci/"#25718
Conversation
3c14117 to
270f820
Compare
d6525bf to
270f820
Compare
|
@Ansuel: Have you seen this PR? |
| @@ -1,3 +1,7 @@ | |||
| location =/ { | |||
| return 301 /cgi-bin/luci/; | |||
There was a problem hiding this comment.
Wouldn't a permanent redirect be cached in the browser creating issues when accessing a device not running Luci under the same IP/URL later?
There was a problem hiding this comment.
Yes, using a 301 would cause the browser to cache the redirect permanently. It might be better to use a 302 instead to avoid potential issues later.
8869eea to
de8e099
Compare
|
I've updated this PR to resolve merge conflicts and reflect the latest changes from |
|
You should probably bump the |
de8e099 to
9bbe561
Compare
Formality Check: Suggestions AvailableWe completed the verification flow. Please review the formatting overview logs below.
|
ed50469 to
9bbe561
Compare
9bbe561 to
bb7ae24
Compare
This change will prevent the blank "LuCI - Lua Configuration Interface" screen from being displayed for the first time when accessing luci via a url like 192.168.1.1 Signed-off-by: Tianshuai Gao <cocopriestyu+github@gmail.com>
bb7ae24 to
95a5529
Compare
This change will prevent the blank
"LuCI - Lua Configuration Interface" screen
from being displayed for the first time
when accessing luci via a url like 192.168.1.1
Maintainer: @Ansuel
Compile tested: (x86/64, 24.10.0-rc4, Edge)
Run tested: (x86/64, 24.10.0-rc4, Edge)
Description:
When using nginx instead of uhttpd, accessing the root url such as "192.168.1.1" or "my-router.lan" will display a blank page and then jump to the luci page like this.

Just add the following lines to
luci.locations:by this way, the blank page will no longer be displayed, and nginx can handle the redirect by itself.
Because it is a 301 response, the browser will automatically jump to /cgi-bin/luci/ the next time you visit.Because it is a 302 response, the browser will automatically jump to /cgi-bin/luci/ the next time you visit. Use
302to prevent browsers from caching the redirect permanently.If you still see a blank page when accessing the root url after applying this patch, you need to open the browser console page when accessing, find the Network tab, check Disable Cache, and then access the root url