mirror of
https://github.com/nginx/nginx.git
synced 2025-08-06 06:46:16 +08:00
auto detect https redirect in rewrite
This commit is contained in:
parent
ebc507bc78
commit
0b5e77f416
@ -357,6 +357,12 @@ ngx_http_rewrite(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
last = 1;
|
||||
}
|
||||
|
||||
if (ngx_strncmp(value[2].data, "https://", sizeof("https://") - 1) == 0) {
|
||||
regex->status = NGX_HTTP_MOVED_TEMPORARILY;
|
||||
regex->redirect = 1;
|
||||
last = 1;
|
||||
}
|
||||
|
||||
if (cf->args->nelts == 4) {
|
||||
if (ngx_strcmp(value[3].data, "last") == 0) {
|
||||
last = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user