feat(template): add selection box; add scheme and host field for reverse_proxy #608

This commit is contained in:
Jacky 2024-10-14 17:53:02 +08:00
parent 77666f4cc6
commit 91799e64c4
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
20 changed files with 474 additions and 136 deletions

View file

@ -13,13 +13,23 @@ type = "string"
name = { en = "Client Max Body Size", zh_CN = "客户端最大请求内容大小"}
value = "1000m"
[variables.scheme]
type = "select"
name = { en = "Scheme", zh_CN = "协议"}
value = "http"
mask = { http = { en = "HTTP" }, https = { en = "HTTPS" } }
[variables.host]
type = "string"
name = { en = "Host", zh_CN = "主机"}
value = "127.0.0.1"
[variables.port]
type = "string"
name = { en = "Port", zh_CN = "端口"}
value = 9000
# Nginx UI Template End
# Nginx UI Custom Start
{{- if .enableWebSocket }}
map $http_upgrade $connection_upgrade {
@ -67,5 +77,5 @@ location / {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Forwarded $proxy_add_forwarded;
proxy_pass http://127.0.0.1:{{ .port }}/;
proxy_pass {{ .scheme }}://{{ .host }}:{{ .port }}/;
}