mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat(template): add selection box; add scheme and host field for reverse_proxy #608
This commit is contained in:
parent
77666f4cc6
commit
91799e64c4
20 changed files with 474 additions and 136 deletions
|
@ -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 }}/;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue