This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2021-08-27 12:15:22 +00:00
|
|
|
listen 443 ssl http2;
|
|
|
|
listen [::]:443 ssl http2;
|
|
|
|
|
|
|
|
include /etc/nginx/conf.d/include/ssl-settings;
|
|
|
|
include /etc/nginx/conf.d/include/init-optional-variables;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
set_by_lua_block $skylink { return string.match(ngx.var.host, "%w+") }
|
2022-02-09 14:53:18 +00:00
|
|
|
set_by_lua_block $path {
|
|
|
|
-- strip ngx.var.request_uri from query params - this is basically the same as ngx.var.uri but
|
|
|
|
-- do not use ngx.var.uri because it will already be unescaped and we need to use escaped path
|
|
|
|
-- examples: escaped uri "/b%20r56+7" and unescaped uri: "/b r56 7"
|
|
|
|
return string.gsub(ngx.var.request_uri, "?.*", "")
|
|
|
|
}
|
2021-08-27 12:15:22 +00:00
|
|
|
|
|
|
|
include /etc/nginx/conf.d/include/location-skylink;
|
|
|
|
}
|