UI - config.json refactoring
This commit is contained in:
parent
bd7b6af668
commit
569ad75c42
647
ui/config.json
647
ui/config.json
@ -1,512 +1,607 @@
|
|||||||
{
|
{
|
||||||
"max-client-size":{
|
"Misc":{
|
||||||
"category":"Misc",
|
"id":"max-client-size",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Max client size",
|
"label":"Max client size",
|
||||||
"env":"MAX_CLIENT_SIZE"
|
"env":"MAX_CLIENT_SIZE",
|
||||||
|
"id":"max-client-size"
|
||||||
},
|
},
|
||||||
"allowed-methods":{
|
{
|
||||||
"category":"Misc",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Allowed methods",
|
"label":"Allowed methods",
|
||||||
"env":"ALLOWED_METHODS"
|
"env":"ALLOWED_METHODS",
|
||||||
|
"id":"allowed-methods"
|
||||||
},
|
},
|
||||||
"serve-files":{
|
{
|
||||||
"category":"Misc",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Serve files",
|
"label":"Serve files",
|
||||||
"env":"SERVE_FILES"
|
"env":"SERVE_FILES",
|
||||||
|
"id":"serve-files"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"remove-headers":{
|
"Info leak":{
|
||||||
"category":"Info leak",
|
"id":"remove-headers",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Remove headers",
|
"label":"Remove headers",
|
||||||
"env":"REMOVE_HEADERS"
|
"env":"REMOVE_HEADERS",
|
||||||
|
"id":"remove-headers"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-auth-basic":{
|
"Basic auth":{
|
||||||
"category":"Basic auth",
|
"id":"use-auth-basic",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use auth basic",
|
"label":"Use auth basic",
|
||||||
"env":"USE_AUTH_BASIC"
|
"env":"USE_AUTH_BASIC",
|
||||||
|
"id":"use-auth-basic"
|
||||||
},
|
},
|
||||||
"auth-basic-location":{
|
{
|
||||||
"category":"Basic auth",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Auth basic location",
|
"label":"Auth basic location",
|
||||||
"env":"AUTH_BASIC_LOCATION"
|
"env":"AUTH_BASIC_LOCATION",
|
||||||
|
"id":"auth-basic-location"
|
||||||
},
|
},
|
||||||
"auth-basic-user":{
|
{
|
||||||
"category":"Basic auth",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Auth basic user",
|
"label":"Auth basic user",
|
||||||
"env":"AUTH_BASIC_USER"
|
"env":"AUTH_BASIC_USER",
|
||||||
|
"id":"auth-basic-user"
|
||||||
},
|
},
|
||||||
"auth-basic-password":{
|
{
|
||||||
"category":"Basic auth",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Auth basic password",
|
"label":"Auth basic password",
|
||||||
"env":"AUTH_BASIC_PASSWORD"
|
"env":"AUTH_BASIC_PASSWORD",
|
||||||
|
"id":"auth-basic-password"
|
||||||
},
|
},
|
||||||
"auth-basic-text":{
|
{
|
||||||
"category":"Basic auth",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Auth basic text",
|
"label":"Auth basic text",
|
||||||
"env":"AUTH_BASIC_TEXT"
|
"env":"AUTH_BASIC_TEXT",
|
||||||
|
"id":"auth-basic-text"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-reverse-proxy":{
|
"Reverse proxy":{
|
||||||
"category":"Reverse proxy",
|
"id":"use-reverse-proxy",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use reverse proxy",
|
"label":"Use reverse proxy",
|
||||||
"env":"USE_REVERSE_PROXY"
|
"env":"USE_REVERSE_PROXY",
|
||||||
|
"id":"use-reverse-proxy"
|
||||||
},
|
},
|
||||||
"reverse-proxy-url":{
|
{
|
||||||
"category":"Reverse proxy",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Reverse proxy url",
|
"label":"Reverse proxy url",
|
||||||
"env":"REVERSE_PROXY_URL"
|
"env":"REVERSE_PROXY_URL",
|
||||||
|
"id":"reverse-proxy-url"
|
||||||
},
|
},
|
||||||
"reverse-proxy-host":{
|
{
|
||||||
"category":"Reverse proxy",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Reverse proxy host",
|
"label":"Reverse proxy host",
|
||||||
"env":"REVERSE_PROXY_HOST"
|
"env":"REVERSE_PROXY_HOST",
|
||||||
|
"id":"reverse-proxy-host"
|
||||||
},
|
},
|
||||||
"reverse-proxy-ws":{
|
{
|
||||||
"category":"Reverse proxy",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Reverse proxy ws",
|
"label":"Reverse proxy ws",
|
||||||
"env":"REVERSE_PROXY_WS"
|
"env":"REVERSE_PROXY_WS",
|
||||||
|
"id":"reverse-proxy-ws"
|
||||||
},
|
},
|
||||||
"proxy-real-ip":{
|
{
|
||||||
"category":"Reverse proxy",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Proxy real ip",
|
"label":"Proxy real ip",
|
||||||
"env":"PROXY_REAL_IP"
|
"env":"PROXY_REAL_IP",
|
||||||
|
"id":"proxy-real-ip"
|
||||||
},
|
},
|
||||||
"proxy-real-ip-from":{
|
{
|
||||||
"category":"Reverse proxy",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy real ip from",
|
"label":"Proxy real ip from",
|
||||||
"env":"PROXY_REAL_IP_FROM"
|
"env":"PROXY_REAL_IP_FROM",
|
||||||
|
"id":"proxy-real-ip-from"
|
||||||
},
|
},
|
||||||
"proxy-real-ip-header":{
|
{
|
||||||
"category":"Reverse proxy",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy real ip header",
|
"label":"Proxy real ip header",
|
||||||
"env":"PROXY_REAL_IP_HEADER"
|
"env":"PROXY_REAL_IP_HEADER",
|
||||||
|
"id":"proxy-real-ip-header"
|
||||||
},
|
},
|
||||||
"proxy-real-ip-recursive":{
|
{
|
||||||
"category":"Reverse proxy",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy real ip recursive",
|
"label":"Proxy real ip recursive",
|
||||||
"env":"PROXY_REAL_IP_RECURSIVE"
|
"env":"PROXY_REAL_IP_RECURSIVE",
|
||||||
|
"id":"proxy-real-ip-recursive"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-gzip":{
|
"Compression":{
|
||||||
"category":"Compression",
|
"id":"compression",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use gzip",
|
"label":"Use gzip",
|
||||||
"env":"USE_GZIP"
|
"env":"USE_GZIP",
|
||||||
|
"id":"use-gzip"
|
||||||
},
|
},
|
||||||
"gzip-comp-level":{
|
{
|
||||||
"category":"Compression",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Gzip comp level",
|
"label":"Gzip comp level",
|
||||||
"env":"GZIP_COMP_LEVEL"
|
"env":"GZIP_COMP_LEVEL",
|
||||||
|
"id":"gzip-comp-level"
|
||||||
},
|
},
|
||||||
"gzip-min-length":{
|
{
|
||||||
"category":"Compression",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Gzip min length",
|
"label":"Gzip min length",
|
||||||
"env":"GZIP_MIN_LENGTH"
|
"env":"GZIP_MIN_LENGTH",
|
||||||
|
"id":"gzip-min-length"
|
||||||
},
|
},
|
||||||
"gzip-types":{
|
{
|
||||||
"category":"Compression",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Gzip types",
|
"label":"Gzip types",
|
||||||
"env":"GZIP_TYPES"
|
"env":"GZIP_TYPES",
|
||||||
|
"id":"gzip-types"
|
||||||
},
|
},
|
||||||
"use-brotli":{
|
{
|
||||||
"category":"Compression",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use brotli",
|
"label":"Use brotli",
|
||||||
"env":"USE_BROTLI"
|
"env":"USE_BROTLI",
|
||||||
|
"id":"use-brotli"
|
||||||
},
|
},
|
||||||
"brotli-comp-level":{
|
{
|
||||||
"category":"Compression",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Brotli comp level",
|
"label":"Brotli comp level",
|
||||||
"env":"BROTLI_COMP_LEVEL"
|
"env":"BROTLI_COMP_LEVEL",
|
||||||
|
"id":"brotli-comp-level"
|
||||||
},
|
},
|
||||||
"brotli-min-length":{
|
{
|
||||||
"category":"Compression",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Brotli min length",
|
"label":"Brotli min length",
|
||||||
"env":"BROTLI_MIN_LENGTH"
|
"env":"BROTLI_MIN_LENGTH",
|
||||||
|
"id":"brotli-min-length"
|
||||||
},
|
},
|
||||||
"brotli-types":{
|
{
|
||||||
"category":"Compression",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Brotli types",
|
"label":"Brotli types",
|
||||||
"env":"BROTLI_TYPES"
|
"env":"BROTLI_TYPES",
|
||||||
|
"id":"brotli-types"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-client-cache":{
|
"Cache":{
|
||||||
"category":"Cache",
|
"id":"cache",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use client cache",
|
"label":"Use client cache",
|
||||||
"env":"USE_CLIENT_CACHE"
|
"env":"USE_CLIENT_CACHE",
|
||||||
|
"id":"use-client-cache"
|
||||||
},
|
},
|
||||||
"client-cache-extensions":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Client cache extensions",
|
"label":"Client cache extensions",
|
||||||
"env":"CLIENT_CACHE_EXTENSIONS"
|
"env":"CLIENT_CACHE_EXTENSIONS",
|
||||||
|
"id":"client-cache-extensions"
|
||||||
},
|
},
|
||||||
"client-cache-control":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Client cache control",
|
"label":"Client cache control",
|
||||||
"env":"CLIENT_CACHE_CONTROL"
|
"env":"CLIENT_CACHE_CONTROL",
|
||||||
|
"id":"client-cache-control"
|
||||||
},
|
},
|
||||||
"client-cache-etag":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Client cache etag",
|
"label":"Client cache etag",
|
||||||
"env":"CLIENT_CACHE_ETAG"
|
"env":"CLIENT_CACHE_ETAG",
|
||||||
|
"id":"client-cache-etag"
|
||||||
},
|
},
|
||||||
"use-open-file-cache":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use open file cache",
|
"label":"Use open file cache",
|
||||||
"env":"USE_OPEN_FILE_CACHE"
|
"env":"USE_OPEN_FILE_CACHE",
|
||||||
|
"id":"use-open-file-cache"
|
||||||
},
|
},
|
||||||
"open-file-cache":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Open file cache",
|
"label":"Open file cache",
|
||||||
"env":"OPEN_FILE_CACHE"
|
"env":"OPEN_FILE_CACHE",
|
||||||
|
"id":"open-file-cache"
|
||||||
},
|
},
|
||||||
"open-file-cache-errors":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Open file cache errors",
|
"label":"Open file cache errors",
|
||||||
"env":"OPEN_FILE_CACHE_ERRORS"
|
"env":"OPEN_FILE_CACHE_ERRORS",
|
||||||
|
"id":"open-file-cache-errors"
|
||||||
},
|
},
|
||||||
"open-file-cache-min-uses":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Open file cache min uses",
|
"label":"Open file cache min uses",
|
||||||
"env":"OPEN_FILE_CACHE_MIN_USES"
|
"env":"OPEN_FILE_CACHE_MIN_USES",
|
||||||
|
"id":"open-file-cache-min-uses"
|
||||||
},
|
},
|
||||||
"open-file-cache-valid":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Open file cache valid",
|
"label":"Open file cache valid",
|
||||||
"env":"OPEN_FILE_CACHE_VALID"
|
"env":"OPEN_FILE_CACHE_VALID",
|
||||||
|
"id":"open-file-cache-valid"
|
||||||
},
|
},
|
||||||
"use-proxy-cache":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use proxy cache",
|
"label":"Use proxy cache",
|
||||||
"env":"USE_PROXY_CACHE"
|
"env":"USE_PROXY_CACHE",
|
||||||
|
"id":"use-proxy-cache"
|
||||||
},
|
},
|
||||||
"proxy-cache-path-zone-size":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy cache path zone size",
|
"label":"Proxy cache path zone size",
|
||||||
"env":"PROXY_CACHE_PATH_ZONE_SIZE"
|
"env":"PROXY_CACHE_PATH_ZONE_SIZE",
|
||||||
|
"id":"proxy-cache-path-zone-size"
|
||||||
},
|
},
|
||||||
"proxy-cache-path-params":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy cache path params",
|
"label":"Proxy cache path params",
|
||||||
"env":"PROXY_CACHE_PATH_PARAMS"
|
"env":"PROXY_CACHE_PATH_PARAMS",
|
||||||
|
"id":"proxy-cache-path-params"
|
||||||
},
|
},
|
||||||
"proxy-cache-methods":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy cache methods",
|
"label":"Proxy cache methods",
|
||||||
"env":"PROXY_CACHE_METHODS"
|
"env":"PROXY_CACHE_METHODS",
|
||||||
|
"id":"proxy-cache-methods"
|
||||||
},
|
},
|
||||||
"proxy-cache-min-uses":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy cache min uses",
|
"label":"Proxy cache min uses",
|
||||||
"env":"PROXY_CACHE_MIN_USES"
|
"env":"PROXY_CACHE_MIN_USES",
|
||||||
|
"id":"proxy-cache-min-uses"
|
||||||
},
|
},
|
||||||
"proxy-cache-key":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy cache key",
|
"label":"Proxy cache key",
|
||||||
"env":"PROXY_CACHE_KEY"
|
"env":"PROXY_CACHE_KEY",
|
||||||
|
"id":"proxy-cache-key"
|
||||||
},
|
},
|
||||||
"proxy-cache-valid":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy cache valid",
|
"label":"Proxy cache valid",
|
||||||
"env":"PROXY_CACHE_VALID"
|
"env":"PROXY_CACHE_VALID",
|
||||||
|
"id":"proxy-cache-valid"
|
||||||
},
|
},
|
||||||
"proxy-no-cache":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy no cache",
|
"label":"Proxy no cache",
|
||||||
"env":"PROXY_NO_CACHE"
|
"env":"PROXY_NO_CACHE",
|
||||||
|
"id":"proxy-no-cache"
|
||||||
},
|
},
|
||||||
"proxy-cache-bypass":{
|
{
|
||||||
"category":"Cache",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Proxy cache bypass",
|
"label":"Proxy cache bypass",
|
||||||
"env":"PROXY_CACHE_BYPASS"
|
"env":"PROXY_CACHE_BYPASS",
|
||||||
|
"id":"proxy-cache-bypass"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"auto-lets-encrypt":{
|
"HTTPS":{
|
||||||
"category":"HTTPS",
|
"id":"https",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Auto lets encrypt",
|
"label":"Auto lets encrypt",
|
||||||
"env":"AUTO_LETS_ENCRYPT"
|
"env":"AUTO_LETS_ENCRYPT",
|
||||||
|
"id":"auto-lets-encrypt"
|
||||||
},
|
},
|
||||||
"email-lets-encrypt":{
|
{
|
||||||
"category":"HTTPS",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Email lets encrypt",
|
"label":"Email lets encrypt",
|
||||||
"env":"EMAIL_LETS_ENCRYPT"
|
"env":"EMAIL_LETS_ENCRYPT",
|
||||||
|
"id":"email-lets-encrypt"
|
||||||
},
|
},
|
||||||
"listen-http":{
|
{
|
||||||
"category":"",
|
|
||||||
"type":"checkbox",
|
|
||||||
"label":"Listen http",
|
|
||||||
"env":"LISTEN_HTTP"
|
|
||||||
},
|
|
||||||
"redirect-http-to-https":{
|
|
||||||
"category":"HTTPS",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Redirect http to https",
|
"label":"Redirect http to https",
|
||||||
"env":"REDIRECT_HTTP_TO_HTTPS"
|
"env":"REDIRECT_HTTP_TO_HTTPS",
|
||||||
|
"id":"redirect-http-to-https"
|
||||||
},
|
},
|
||||||
"http2":{
|
{
|
||||||
"category":"HTTPS",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"HTTP2",
|
"label":"HTTP2",
|
||||||
"env":"HTTP2"
|
"env":"HTTP2",
|
||||||
|
"id":"http2"
|
||||||
},
|
},
|
||||||
"https-protocols":{
|
{
|
||||||
"category":"HTTPS",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"HTTPS protocols",
|
"label":"HTTPS protocols",
|
||||||
"env":"HTTPS_PROTOCOLS"
|
"env":"HTTPS_PROTOCOLS",
|
||||||
|
"id":"https-protocols"
|
||||||
},
|
},
|
||||||
"use-modsecurity":{
|
{
|
||||||
"category":"ModSecurity",
|
"type":"checkbox",
|
||||||
|
"label":"Listen http",
|
||||||
|
"env":"LISTEN_HTTP",
|
||||||
|
"id":"listen-http"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ModSecurity":{
|
||||||
|
"id":"modsecurity",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use modsecurity",
|
"label":"Use modsecurity",
|
||||||
"env":"USE_MODSECURITY"
|
"env":"USE_MODSECURITY",
|
||||||
|
"id":"use-modsecurity"
|
||||||
},
|
},
|
||||||
"use-modsecurity-crs":{
|
{
|
||||||
"category":"ModSecurity",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use modsecurity crs",
|
"label":"Use modsecurity crs",
|
||||||
"env":"USE_MODSECURITY_CRS"
|
"env":"USE_MODSECURITY_CRS",
|
||||||
|
"id":"use-modsecurity-crs"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"x-frame-options":{
|
"Headers":{
|
||||||
"category":"Headers",
|
"id":"headers",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"X frame options",
|
"label":"X frame options",
|
||||||
"env":"X_FRAME_OPTIONS"
|
"env":"X_FRAME_OPTIONS",
|
||||||
|
"id":"x-frame-options"
|
||||||
},
|
},
|
||||||
"x-xss-protection":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"X xss protection",
|
"label":"X xss protection",
|
||||||
"env":"X_XSS_PROTECTION"
|
"env":"X_XSS_PROTECTION",
|
||||||
|
"id":"x-xss-protection"
|
||||||
},
|
},
|
||||||
"x-content-type-options":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"X content type options",
|
"label":"X content type options",
|
||||||
"env":"X_CONTENT_TYPE_OPTIONS"
|
"env":"X_CONTENT_TYPE_OPTIONS",
|
||||||
|
"id":"x-content-type-options"
|
||||||
},
|
},
|
||||||
"referrer-policy":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Referrer policy",
|
"label":"Referrer policy",
|
||||||
"env":"REFERRER_POLICY"
|
"env":"REFERRER_POLICY",
|
||||||
|
"id":"referrer-policy"
|
||||||
},
|
},
|
||||||
"feature-policy":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Feature policy",
|
"label":"Feature policy",
|
||||||
"env":"FEATURE_POLICY"
|
"env":"FEATURE_POLICY",
|
||||||
|
"id":"feature-policy"
|
||||||
},
|
},
|
||||||
"permissions-policy":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Permissions policy",
|
"label":"Permissions policy",
|
||||||
"env":"PERMISSIONS_POLICY"
|
"env":"PERMISSIONS_POLICY",
|
||||||
|
"id":"permissions-policy"
|
||||||
},
|
},
|
||||||
"cookie-flags":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Cookie flags",
|
"label":"Cookie flags",
|
||||||
"env":"COOKIE_FLAGS"
|
"env":"COOKIE_FLAGS",
|
||||||
|
"id":"cookie-flags"
|
||||||
},
|
},
|
||||||
"cookie-auto-secure-flag":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Cookie auto secure flag",
|
"label":"Cookie auto secure flag",
|
||||||
"env":"COOKIE_AUTO_SECURE_FLAG"
|
"env":"COOKIE_AUTO_SECURE_FLAG",
|
||||||
|
"id":"cookie-auto-secure-flag"
|
||||||
},
|
},
|
||||||
"strict-transport-security":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Strict transport security",
|
"label":"Strict transport security",
|
||||||
"env":"STRICT_TRANSPORT_SECURITY"
|
"env":"STRICT_TRANSPORT_SECURITY",
|
||||||
|
"id":"strict-transport-security"
|
||||||
},
|
},
|
||||||
"content-security-policy":{
|
{
|
||||||
"category":"Headers",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Content security policy",
|
"label":"Content security policy",
|
||||||
"env":"CONTENT_SECURITY_POLICY"
|
"env":"CONTENT_SECURITY_POLICY",
|
||||||
|
"id":"content-security-policy"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-antibot":{
|
"Antibot":{
|
||||||
"category":"Antibot",
|
"id":"Antibot",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Use antibot",
|
"label":"Use antibot",
|
||||||
"env":"USE_ANTIBOT"
|
"env":"USE_ANTIBOT",
|
||||||
|
"id":"use-antibot"
|
||||||
},
|
},
|
||||||
"antibot-uri":{
|
{
|
||||||
"category":"Antibot",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Antibot uri",
|
"label":"Antibot uri",
|
||||||
"env":"ANTIBOT_URI"
|
"env":"ANTIBOT_URI",
|
||||||
|
"id":"antibot-uri"
|
||||||
},
|
},
|
||||||
"antibot-session-secret":{
|
{
|
||||||
"category":"Antibot",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Antibot session secret",
|
"label":"Antibot session secret",
|
||||||
"env":"ANTIBOT_SESSION_SECRET"
|
"env":"ANTIBOT_SESSION_SECRET",
|
||||||
|
"id":"antibot-session-secret"
|
||||||
},
|
},
|
||||||
"antibot-recaptcha-score":{
|
{
|
||||||
"category":"Antibot",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Antibot recaptcha score",
|
"label":"Antibot recaptcha score",
|
||||||
"env":"ANTIBOT_RECAPTCHA_SCORE"
|
"env":"ANTIBOT_RECAPTCHA_SCORE",
|
||||||
|
"id":"antibot-recaptcha-score"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"block-user-agent":{
|
"Block":{
|
||||||
"category":"Block",
|
"id":"block",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Block user agent",
|
"label":"Block user agent",
|
||||||
"env":"BLOCK_USER_AGENT"
|
"env":"BLOCK_USER_AGENT",
|
||||||
|
"id":"block-user-agent"
|
||||||
},
|
},
|
||||||
"block-tor-exit-node":{
|
{
|
||||||
"category":"Block",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Block tor exit node",
|
"label":"Block tor exit node",
|
||||||
"env":"BLOCK_TOR_EXIT_NODE"
|
"env":"BLOCK_TOR_EXIT_NODE",
|
||||||
|
"id":"block-tor-exit-node"
|
||||||
},
|
},
|
||||||
"block-proxies":{
|
{
|
||||||
"category":"Block",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Block proxies",
|
"label":"Block proxies",
|
||||||
"env":"BLOCK_PROXIES"
|
"env":"BLOCK_PROXIES",
|
||||||
|
"id":"block-proxies"
|
||||||
},
|
},
|
||||||
"block-abusers":{
|
{
|
||||||
"category":"Block",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Block abusers",
|
"label":"Block abusers",
|
||||||
"env":"BLOCK_ABUSERS"
|
"env":"BLOCK_ABUSERS",
|
||||||
|
"id":"block-abusers"
|
||||||
},
|
},
|
||||||
"block-referrer":{
|
{
|
||||||
"category":"Block",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Block referrer",
|
"label":"Block referrer",
|
||||||
"env":"BLOCK_REFERRER"
|
"env":"BLOCK_REFERRER",
|
||||||
|
"id":"block-referrer"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-dnsbl":{
|
"DNSBL":{
|
||||||
"category":"DNSBL",
|
"id":"dnsbl",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use dnsbl",
|
"label":"Use dnsbl",
|
||||||
"env":"USE_DNSBL"
|
"env":"USE_DNSBL",
|
||||||
|
"id":"use-dnsbl"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-crowdsec":{
|
"CrowdSec":{
|
||||||
"category":"CrowdSec",
|
"id":"use-crowdsec",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use crowdsec",
|
"label":"Use crowdsec",
|
||||||
"env":"USE_CROWDSEC"
|
"env":"USE_CROWDSEC",
|
||||||
|
"id":"use-crowdsec"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-whitelist-ip":{
|
"Whitelist":{
|
||||||
"category":"Whitelist",
|
"id":"whitelist",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use whitelist ip",
|
"label":"Use whitelist ip",
|
||||||
"env":"USE_WHITELIST_IP"
|
"env":"USE_WHITELIST_IP",
|
||||||
|
"id":"use-whitelist-ip"
|
||||||
},
|
},
|
||||||
"use-whitelist-reverse":{
|
{
|
||||||
"category":"Whitelist",
|
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use whitelist reverse",
|
"label":"Use whitelist reverse",
|
||||||
"env":"USE_WHITELIST_REVERSE"
|
"env":"USE_WHITELIST_REVERSE",
|
||||||
|
"id":"use-whitelist-reverse"
|
||||||
},
|
},
|
||||||
"use-blacklist-ip":{
|
{
|
||||||
"category":"Blacklist",
|
|
||||||
"type":"checkbox",
|
|
||||||
"label":"Use blacklist ip",
|
|
||||||
"env":"USE_BLACKLIST_IP"
|
|
||||||
},
|
|
||||||
"use-blacklist-reverse":{
|
|
||||||
"category":"Blacklist",
|
|
||||||
"type":"checkbox",
|
|
||||||
"label":"Use blacklist reverse",
|
|
||||||
"env":"USE_BLACKLIST_REVERSE"
|
|
||||||
},
|
|
||||||
"use-limit-req":{
|
|
||||||
"category":"Limit req",
|
|
||||||
"type":"checkbox",
|
|
||||||
"label":"Use limit req",
|
|
||||||
"env":"USE_LIMIT_REQ"
|
|
||||||
},
|
|
||||||
"limit-req-rate":{
|
|
||||||
"category":"Limit req",
|
|
||||||
"type":"text",
|
|
||||||
"label":"Limit req rate",
|
|
||||||
"env":"LIMIT_REQ_RATE"
|
|
||||||
},
|
|
||||||
"limit-req-burst":{
|
|
||||||
"category":"Limit req",
|
|
||||||
"type":"text",
|
|
||||||
"label":"Limit req burst",
|
|
||||||
"env":"LIMIT_REQ_BURST"
|
|
||||||
},
|
|
||||||
"blacklist-country":{
|
|
||||||
"category":"Blacklist",
|
|
||||||
"type":"text",
|
|
||||||
"label":"Blacklist country",
|
|
||||||
"env":"BLACKLIST_COUNTRY"
|
|
||||||
},
|
|
||||||
"whitelist-country":{
|
|
||||||
"category":"Whitelist",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Whitelist country",
|
"label":"Whitelist country",
|
||||||
"env":"WHITELIST_COUNTRY"
|
"env":"WHITELIST_COUNTRY",
|
||||||
|
"id":"whitelist-country"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"remote-php":{
|
"Blacklist":{
|
||||||
"category":"PHP",
|
"id":"blacklist",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
|
"type":"checkbox",
|
||||||
|
"label":"Use blacklist ip",
|
||||||
|
"env":"USE_BLACKLIST_IP",
|
||||||
|
"id":"use-blacklist-ip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"checkbox",
|
||||||
|
"label":"Use blacklist reverse",
|
||||||
|
"env":"USE_BLACKLIST_REVERSE",
|
||||||
|
"id":"use-blacklist-reverse"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"text",
|
||||||
|
"label":"Blacklist country",
|
||||||
|
"env":"BLACKLIST_COUNTRY",
|
||||||
|
"id":"blacklist-country"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Limit req":{
|
||||||
|
"id":"limit-req",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
|
"type":"checkbox",
|
||||||
|
"label":"Use limit req",
|
||||||
|
"env":"USE_LIMIT_REQ",
|
||||||
|
"id":"use-limit-req"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"text",
|
||||||
|
"label":"Limit req rate",
|
||||||
|
"env":"LIMIT_REQ_RATE",
|
||||||
|
"id":"limit-req-rate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"text",
|
||||||
|
"label":"Limit req burst",
|
||||||
|
"env":"LIMIT_REQ_BURST",
|
||||||
|
"id":"limit-req-burst"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PHP":{
|
||||||
|
"id":"php",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Remote php",
|
"label":"Remote php",
|
||||||
"env":"REMOTE_PHP"
|
"env":"REMOTE_PHP",
|
||||||
|
"id":"remote-php"
|
||||||
},
|
},
|
||||||
"remote-php-path":{
|
{
|
||||||
"category":"PHP",
|
|
||||||
"type":"text",
|
"type":"text",
|
||||||
"label":"Remote php path",
|
"label":"Remote php path",
|
||||||
"env":"REMOTE_PHP_PATH"
|
"env":"REMOTE_PHP_PATH",
|
||||||
|
"id":"remote-php-path"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-fail2ban":{
|
"Fail2ban":{
|
||||||
"category":"PHP",
|
"id":"fail2ban",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use fail2ban",
|
"label":"Use fail2ban",
|
||||||
"env":"USE_FAIL2BAN"
|
"env":"USE_FAIL2BAN",
|
||||||
|
"id":"use-fail2ban"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"use-clamav-upload":{
|
"ClamAV":{
|
||||||
"category":"ClamAV",
|
"id":"clamav",
|
||||||
|
"params":[
|
||||||
|
{
|
||||||
"type":"checkbox",
|
"type":"checkbox",
|
||||||
"label":"Use clamav upload",
|
"label":"Use clamav upload",
|
||||||
"env":"USE_CLAMAV_UPLOAD"
|
"env":"USE_CLAMAV_UPLOAD",
|
||||||
|
"id":"use-clamav-upload"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,15 +11,7 @@ if "ABSOLUTE_URI" in os.environ :
|
|||||||
ABSOLUTE_URI = os.environ["ABSOLUTE_URI"]
|
ABSOLUTE_URI = os.environ["ABSOLUTE_URI"]
|
||||||
app.config["ABSOLUTE_URI"] = ABSOLUTE_URI
|
app.config["ABSOLUTE_URI"] = ABSOLUTE_URI
|
||||||
with open("/opt/entrypoint/config.json", "r") as f :
|
with open("/opt/entrypoint/config.json", "r") as f :
|
||||||
config = json.loads(f.read())
|
app.config["CONFIG"] = json.loads(f.read())
|
||||||
app.config["CONFIG"] = {}
|
|
||||||
for k in config :
|
|
||||||
if not config[k]["category"] in app.config["CONFIG"] :
|
|
||||||
app.config["CONFIG"][config[k]["category"]] = []
|
|
||||||
tmp = config[k].copy()
|
|
||||||
tmp["id"] = k
|
|
||||||
app.config["CONFIG"][config[k]["category"]].append(tmp)
|
|
||||||
|
|
||||||
app.jinja_env.globals.update(env_to_summary_class=utils.env_to_summary_class)
|
app.jinja_env.globals.update(env_to_summary_class=utils.env_to_summary_class)
|
||||||
app.jinja_env.globals.update(form_service_gen=utils.form_service_gen)
|
app.jinja_env.globals.update(form_service_gen=utils.form_service_gen)
|
||||||
|
|
||||||
|
|||||||
@ -10,10 +10,9 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
||||||
{% set check = {"active": "active", "selected": "true"} %}
|
{% set check = {"active": "active", "selected": "true"} %}
|
||||||
{% for category in config["CONFIG"] %}
|
{% for k, v in config["CONFIG"].items() %}
|
||||||
{% set id_category = category.replace(" ", "") %}
|
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<a class="nav-link {{ check.active }}" id="edit-{{ id_category }}-{{ id_server_name }}-tab" data-bs-toggle="pill" href="#edit-{{ id_category }}-{{ id_server_name }}" role="tab" aria-controls="edit-{{ id_category }}-{{ id_server_name }}" aria-selected="{{ check.selected }}">{{ category }}</a>
|
<a class="nav-link {{ check.active }}" id="edit-{{ v["id"] }}-{{ id_server_name }}-tab" data-bs-toggle="pill" href="#edit-{{ v["id"] }}-{{ id_server_name }}" role="tab" aria-controls="edit-{{ v["id"] }}-{{ id_server_name }}" aria-selected="{{ check.selected }}">{{ k }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% if check.update({"active": "", "selected": "false"}) %}
|
{% if check.update({"active": "", "selected": "false"}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -21,11 +20,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content" id="edit-content-{{ id_server_name }}">
|
<div class="tab-content" id="edit-content-{{ id_server_name }}">
|
||||||
{% set check = {"class": "show active"} %}
|
{% set check = {"class": "show active"} %}
|
||||||
{% for category in config["CONFIG"] %}
|
{% for k, v in config["CONFIG"].items() %}
|
||||||
{% set id_category = category.replace(" ", "") %}
|
<div class="tab-pane fade {{ check.class }}" id="edit-{{ v["id"] }}-{{ id_server_name }}" role="tabpanel" aria-labelledby="edit-{{ v["id"] }}-{{ id_server_name }}-tab">
|
||||||
<div class="tab-pane fade {{ check.class }}" id="edit-{{ id_category }}-{{ id_server_name }}" role="tabpanel" aria-labelledby="edit-{{ id_category }}-{{ id_server_name }}-tab">
|
{% for param in v["params"] %}
|
||||||
{% for config in config["CONFIG"][category] %}
|
{{ form_service_gen("edit", id_server_name, param["id"], param["label"], param["type"], service[param["env"]])|safe }}
|
||||||
{{ form_service_gen("edit", service["SERVER_NAME"], config["id"], config["label"], config["type"], service[config["env"]])|safe }}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% if check.update({"class": ""}) %}
|
{% if check.update({"class": ""}) %}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ def env_to_summary_class(var, value) :
|
|||||||
|
|
||||||
def form_service_gen(form, server, id, label, type, value) :
|
def form_service_gen(form, server, id, label, type, value) :
|
||||||
if form == "edit" :
|
if form == "edit" :
|
||||||
new_id = "form-edit-" + server.replace(".", "-") + "-" + id
|
new_id = "form-edit-" + server + "-" + id
|
||||||
elif form == "new" :
|
elif form == "new" :
|
||||||
new_id = "form-new-" + id
|
new_id = "form-new-" + id
|
||||||
if type == "text" :
|
if type == "text" :
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user