mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(hakurei): plain redirect
This commit is contained in:
parent
59808530ec
commit
2b9d14d832
1 changed files with 7 additions and 0 deletions
|
|
@ -38,7 +38,14 @@ in {
|
|||
if ($prox_prefix != $prox_expected) {
|
||||
return 501;
|
||||
}
|
||||
set $prox_plain ''';
|
||||
if ($request_uri ~ "^/([^/]+)$") {
|
||||
set $prox_plain $1;
|
||||
}
|
||||
if ($prox_plain = $prox_expected) {
|
||||
return 302 https://$host/$prox_plain/;
|
||||
}
|
||||
if ($prox_plain != ''') {
|
||||
rewrite /(.*) /prox/$1 last;
|
||||
}
|
||||
rewrite /[^/]+/(.*) /prox/$1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue