start handling multiple on raw mode

This commit is contained in:
Jordan Blasenhauer 2024-08-08 19:56:54 +02:00
parent 22f8477446
commit 711e3b802f
10 changed files with 425 additions and 66 deletions

View file

@ -62,7 +62,6 @@ def get_forms(
# Copy of the plugins, and get the plugins by context if needed
# In services page, we want only multisite settings, but in global config we want both
plugins_base = get_plugins_multisite(plugins) if only_multisite else plugins
# This template will be used to show default value or value if exists
templates = [
{

File diff suppressed because one or more lines are too long

View file

@ -3427,9 +3427,44 @@
"mobile": 12
},
"disabled": false,
"value": "test",
"value": "",
"name": "Custom header (HeaderName: HeaderValue)",
"prev_value": "test",
"prev_value": "",
"popovers": [
{
"iconName": "disk",
"text": "inp_popover_multisite"
},
{
"iconName": "info",
"text": "Custom header to add (HeaderName: HeaderValue)."
}
],
"containerClass": "z-13",
"method": "default"
}
},
"2": {
"CUSTOM_HEADER_2": {
"context": "multisite",
"default": "",
"help": "Custom header to add (HeaderName: HeaderValue).",
"id": "custom-header-2",
"label": "Custom header (HeaderName: HeaderValue)",
"regex": "^([\\w\\-]+: .+)?$",
"type": "text",
"multiple": "custom-headers",
"pattern": "^([\\w\\-]+: .+)?$",
"inpType": "input",
"columns": {
"pc": 4,
"tablet": 6,
"mobile": 12
},
"disabled": false,
"value": "dzdz",
"name": "Custom header (HeaderName: HeaderValue)",
"prev_value": "dzdz",
"popovers": [
{
"iconName": "disk",
@ -10293,9 +10328,44 @@
"mobile": 12
},
"disabled": false,
"value": "test",
"value": "",
"name": "Custom header (HeaderName: HeaderValue)",
"prev_value": "test",
"prev_value": "",
"popovers": [
{
"iconName": "disk",
"text": "inp_popover_multisite"
},
{
"iconName": "info",
"text": "Custom header to add (HeaderName: HeaderValue)."
}
],
"containerClass": "z-13",
"method": "default"
}
},
"2": {
"CUSTOM_HEADER_2": {
"context": "multisite",
"default": "",
"help": "Custom header to add (HeaderName: HeaderValue).",
"id": "custom-header-2",
"label": "Custom header (HeaderName: HeaderValue)",
"regex": "^([\\w\\-]+: .+)?$",
"type": "text",
"multiple": "custom-headers",
"pattern": "^([\\w\\-]+: .+)?$",
"inpType": "input",
"columns": {
"pc": 4,
"tablet": 6,
"mobile": 12
},
"disabled": false,
"value": "dzdz",
"name": "Custom header (HeaderName: HeaderValue)",
"prev_value": "dzdz",
"popovers": [
{
"iconName": "disk",

View file

@ -3705,7 +3705,8 @@ total_config = {
},
"app1.example.com_LISTEN_STREAM": {"value": "yes", "global": True, "method": "default", "template": None},
"app1.example.com_REVERSE_PROXY_CUSTOM_HOST": {"value": "", "global": True, "method": "default", "template": None},
"app1.example.com_CUSTOM_HEADER": {"value": "test", "global": False, "method": "default", "template": None},
"app1.example.com_CUSTOM_HEADER": {"value": "", "global": True, "method": "default", "template": None},
"app1.example.com_CUSTOM_HEADER_2": {"value": "dzdz", "global": True, "method": "default", "template": None},
"app1.example.com_OPEN_FILE_CACHE_ERRORS": {"value": "yes", "global": True, "method": "default", "template": None},
"app1.example.com_LIMIT_REQ_URL": {"value": "/", "global": True, "method": "default", "template": None},
"app1.example.com_LIMIT_CONN_MAX_HTTP2": {"value": "100", "global": True, "method": "default", "template": None},

File diff suppressed because one or more lines are too long

View file

@ -5,9 +5,8 @@ def advanced_mode_builder(templates: list[dict], plugins: list, global_config: d
"""Render forms with global config data.
ATM we don't need templates but we need to pass at least one to the function (it will simply not override anything).
"""
# We need
settings = get_service_settings(service_name, global_config, total_config)
builder = [
{
"type": "card",

View file

@ -154,7 +154,7 @@ def set_easy(template: list, plugins_base: list, settings: dict, is_new: bool) -
return steps
def set_raw(template: list, plugins_base: list, settings: dict) -> dict:
def set_raw(template: list, plugins_base: list, settings: dict, is_new: bool = False) -> dict:
"""
Set the raw form based on the template and plugins data.
It consists of keeping only the value or default value for each plugin settings.
@ -167,29 +167,32 @@ def set_raw(template: list, plugins_base: list, settings: dict) -> dict:
for plugin in plugins:
for setting, value in plugin.get("settings").items():
# Avoid issue with multiple settings
if not setting in settings:
continue
is_multiple_setting = "multiple" in value
template_value, current_value, default_value, is_disabled_method, is_current_from_template, is_current_default, setting_value = get_setting_data(
template_settings,
settings,
setting,
value,
)
# By default, we will loop on one setting (not multiple)
total_settings = {setting: value}
# We want to show any methods on raw mode
# Case multiple, retrieve all settings that start with setting name
if is_multiple_setting:
# get all settings that start with setting name
total_settings = {k: v for k, v in settings.items() if k.startswith(f"{setting}")}
# if is_disabled_method :
# continue
# Loop in a same way it is a multiple or regular setting
for mult_setting, mult_value in total_settings.items():
if current_value is not None and not is_current_default:
raw_settings[setting] = current_value
continue
# Get setting data
# We need to send setting and not mult_setting because mult_setting is unknown on plugin side
template_value, current_value, default_value, is_disabled_method, is_current_from_template, is_current_default, setting_value = (
get_setting_data(template_settings, settings, mult_setting, mult_value)
)
if template_value is not None:
raw_settings[setting] = template_value
continue
if current_value is not None:
raw_settings[mult_setting] = current_value
continue
if template_value is not None:
raw_settings[mult_setting] = template_value
continue
return raw_settings

View file

@ -29,28 +29,16 @@
"raw": {
"default": {
"SERVER_NAME": "app1.example.com",
"USE_BLACKLIST": "no",
"USE_BUNKERNET": "no",
"CORS_ALLOW_ORIGIN": "self",
"CROSS_ORIGIN_OPENER_POLICY": "same-origin",
"CROSS_ORIGIN_EMBEDDER_POLICY": "require-corp",
"CROSS_ORIGIN_RESOURCE_POLICY": "same-site",
"USE_CLIENT_CACHE": "yes",
"USE_GZIP": "yes",
"REMOVE_HEADERS": "Server Expect-CT X-Powered-By X-AspNet-Version X-AspNetMvc-Version Public-Key-Pins",
"KEEP_UPSTREAM_HEADERS": "Content-Security-Policy Permissions-Policy X-Frame-Options",
"STRICT_TRANSPORT_SECURITY": "max-age=31536000; includeSubDomains; preload",
"PERMISSIONS_POLICY": "accelerometer=(), ambient-light-sensor=(), attribution-reporting=(), autoplay=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), compute-pressure=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), otp-credentials=(), payment=(), picture-in-picture=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), speaker-selection=(), storage-access=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()",
"SERVE_FILES": "no",
"MODSECURITY_CRS_VERSION": "4",
"USE_REVERSE_PROXY": "yes",
"REVERSE_PROXY_HOST": "http://app1:8080",
"USE_WHITELIST": "no"
},
"low": {
"SERVER_NAME": "app1.example.com",
"USE_ANTIBOT": "yes",
"SERVER_TYPE": "http",
"LISTEN_STREAM": "yes",
"LISTEN_STREAM_PORT": "1337",
"LISTEN_STREAM_PORT_SSL": "4242",
"USE_UDP": "no",
"IS_DRAFT": "no",
"USE_ANTIBOT": "no",
"ANTIBOT_URI": "/challenge",
"ANTIBOT_TIME_RESOLVE": "60",
"ANTIBOT_TIME_VALID": "86400",
"ANTIBOT_RECAPTCHA_SCORE": "0.7",
"ANTIBOT_RECAPTCHA_SITEKEY": "",
"ANTIBOT_RECAPTCHA_SECRET": "",
@ -58,50 +46,348 @@
"ANTIBOT_HCAPTCHA_SECRET": "",
"ANTIBOT_TURNSTILE_SITEKEY": "",
"ANTIBOT_TURNSTILE_SECRET": "",
"USE_AUTH_BASIC": "no",
"AUTH_BASIC_LOCATION": "sitewide",
"AUTH_BASIC_USER": "changeme",
"AUTH_BASIC_PASSWORD": "changeme",
"AUTH_BASIC_TEXT": "Restricted area",
"USE_BAD_BEHAVIOR": "yes",
"BAD_BEHAVIOR_STATUS_CODES": "400 401 403 404 405 429 444",
"BAD_BEHAVIOR_THRESHOLD": "30",
"BAD_BEHAVIOR_THRESHOLD": "10",
"BAD_BEHAVIOR_COUNT_TIME": "60",
"BAD_BEHAVIOR_BAN_TIME": "3600",
"BAD_BEHAVIOR_BAN_TIME": "86400",
"USE_BLACKLIST": "no",
"BLACKLIST_IP": "",
"BLACKLIST_RDNS": ".shodan.io .censys.io",
"BLACKLIST_RDNS_GLOBAL": "yes",
"BLACKLIST_ASN": "",
"BLACKLIST_USER_AGENT": "",
"BLACKLIST_URI": "",
"BLACKLIST_IGNORE_IP": "",
"BLACKLIST_IGNORE_RDNS": "",
"BLACKLIST_IGNORE_ASN": "",
"BLACKLIST_IGNORE_USER_AGENT": "",
"BLACKLIST_IGNORE_URI": "",
"USE_BROTLI": "no",
"BROTLI_TYPES": "application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml",
"BROTLI_MIN_LENGTH": "1000",
"BROTLI_COMP_LEVEL": "6",
"USE_BUNKERNET": "no",
"USE_CORS": "yes",
"USE_CORS": "no",
"CORS_ALLOW_ORIGIN": "self",
"CORS_ALLOW_METHODS": "GET, POST, OPTIONS",
"CORS_ALLOW_HEADERS": "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range",
"CORS_ALLOW_CREDENTIALS": "no",
"CORS_EXPOSE_HEADERS": "Content-Length,Content-Range",
"CROSS_ORIGIN_OPENER_POLICY": "same-origin",
"CROSS_ORIGIN_EMBEDDER_POLICY": "require-corp",
"CROSS_ORIGIN_RESOURCE_POLICY": "same-site",
"CORS_MAX_AGE": "86400",
"CORS_DENY_REQUEST": "yes",
"USE_CLIENT_CACHE": "yes",
"USE_DNSBL": "no",
"CLIENT_CACHE_ETAG": "yes",
"CLIENT_CACHE_CONTROL": "public, max-age=15552000",
"BLACKLIST_COUNTRY": "",
"WHITELIST_COUNTRY": "",
"USE_CUSTOM_SSL": "no",
"CUSTOM_SSL_CERT": "",
"CUSTOM_SSL_KEY": "",
"CUSTOM_SSL_CERT_DATA": "",
"CUSTOM_SSL_KEY_DATA": "",
"USE_DNSBL": "yes",
"ERRORS": "",
"INTERCEPTED_ERROR_CODES": "400 401 403 404 405 413 429 500 501 502 503 504",
"USE_GREYLIST": "no",
"GREYLIST_IP": "",
"GREYLIST_RDNS": "",
"GREYLIST_RDNS_GLOBAL": "yes",
"GREYLIST_ASN": "",
"GREYLIST_USER_AGENT": "",
"GREYLIST_URI": "",
"USE_GZIP": "yes",
"GZIP_TYPES": "application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml",
"GZIP_MIN_LENGTH": "1000",
"GZIP_COMP_LEVEL": "5",
"GZIP_PROXIED": "no-cache no-store private expired auth",
"INJECT_BODY": "",
"CUSTOM_HEADER": "",
"CUSTOM_HEADER_2": "dzdz",
"REMOVE_HEADERS": "Server Expect-CT X-Powered-By X-AspNet-Version X-AspNetMvc-Version Public-Key-Pins",
"KEEP_UPSTREAM_HEADERS": "Content-Security-Policy Permissions-Policy X-Frame-Options",
"STRICT_TRANSPORT_SECURITY": "max-age=31536000; includeSubDomains; preload",
"COOKIE_FLAGS": "* SameSite=Lax",
"CONTENT_SECURITY_POLICY": "",
"REFERRER_POLICY": "no-referrer-when-downgrade",
"COOKIE_FLAGS": "* HttpOnly SameSite=Lax",
"COOKIE_AUTO_SECURE_FLAG": "yes",
"CONTENT_SECURITY_POLICY": "object-src 'none'; form-action 'self'; frame-ancestors 'self';",
"CONTENT_SECURITY_POLICY_REPORT_ONLY": "no",
"REFERRER_POLICY": "strict-origin-when-cross-origin",
"PERMISSIONS_POLICY": "accelerometer=(), ambient-light-sensor=(), attribution-reporting=(), autoplay=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), compute-pressure=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), otp-credentials=(), payment=(), picture-in-picture=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), speaker-selection=(), storage-access=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()",
"AUTO_LETS_ENCRYPT": "yes",
"X_FRAME_OPTIONS": "SAMEORIGIN",
"X_CONTENT_TYPE_OPTIONS": "nosniff",
"X_XSS_PROTECTION": "1; mode=block",
"AUTO_LETS_ENCRYPT": "no",
"EMAIL_LETS_ENCRYPT": "",
"USE_LETS_ENCRYPT_STAGING": "no",
"USE_LIMIT_REQ": "yes",
"LIMIT_REQ_URL": "/",
"LIMIT_REQ_RATE": "5r/s",
"LIMIT_REQ_RATE": "2r/s",
"USE_LIMIT_CONN": "yes",
"LIMIT_CONN_MAX_HTTP1": "25",
"LIMIT_CONN_MAX_HTTP2": "200",
"ALLOWED_METHODS": "GET|POST|HEAD|OPTIONS|PUT|DELETE|PATCH",
"MAX_CLIENT_SIZE": "100m",
"LIMIT_CONN_MAX_HTTP1": "10",
"LIMIT_CONN_MAX_HTTP2": "100",
"LIMIT_CONN_MAX_STREAM": "10",
"USE_METRICS": "yes",
"REDIRECT_HTTP_TO_HTTPS": "no",
"AUTO_REDIRECT_HTTP_TO_HTTPS": "yes",
"ALLOWED_METHODS": "GET|POST|HEAD",
"MAX_CLIENT_SIZE": "10m",
"SERVE_FILES": "no",
"ROOT_FOLDER": "",
"SSL_PROTOCOLS": "TLSv1.2 TLSv1.3",
"HTTP2": "yes",
"HTTP3": "yes",
"HTTP3": "no",
"HTTP3_ALT_SVC_PORT": "443",
"LISTEN_HTTP": "yes",
"USE_OPEN_FILE_CACHE": "no",
"OPEN_FILE_CACHE": "max=1000 inactive=20s",
"OPEN_FILE_CACHE_ERRORS": "yes",
"OPEN_FILE_CACHE_MIN_USES": "2",
"OPEN_FILE_CACHE_VALID": "30s",
"USE_MODSECURITY": "yes",
"USE_MODSECURITY_CRS": "yes",
"MODSECURITY_CRS_VERSION": "4",
"MODSECURITY_SEC_AUDIT_ENGINE": "RelevantOnly",
"MODSECURITY_SEC_RULE_ENGINE": "On",
"MODSECURITY_SEC_AUDIT_LOG_PARTS": "ABCFHZ",
"REMOTE_PHP": "",
"REMOTE_PHP_PATH": "",
"LOCAL_PHP": "",
"LOCAL_PHP_PATH": "",
"USE_REAL_IP": "no",
"USE_PROXY_PROTOCOL": "no",
"REAL_IP_FROM": "192.168.0.0/16 172.16.0.0/12 10.0.0.0/8",
"REAL_IP_HEADER": "X-Forwarded-For",
"REAL_IP_RECURSIVE": "yes",
"REDIRECT_TO": "",
"REDIRECT_TO_REQUEST_URI": "no",
"REDIRECT_TO_STATUS_CODE": "301",
"USE_REVERSE_PROXY": "yes",
"REVERSE_PROXY_INTERCEPT_ERRORS": "yes",
"REVERSE_PROXY_CUSTOM_HOST": "",
"REVERSE_PROXY_HOST": "http://app1:8080",
"REVERSE_PROXY_URL": "/",
"REVERSE_PROXY_WS": "no",
"REVERSE_PROXY_HEADERS": "",
"REVERSE_PROXY_HEADERS_CLIENT": "",
"REVERSE_PROXY_BUFFERING": "yes",
"REVERSE_PROXY_KEEPALIVE": "no",
"USE_WHITELIST": "no"
"REVERSE_PROXY_AUTH_REQUEST": "",
"REVERSE_PROXY_AUTH_REQUEST_SIGNIN_URL": "",
"REVERSE_PROXY_AUTH_REQUEST_SET": "",
"REVERSE_PROXY_CONNECT_TIMEOUT": "60s",
"REVERSE_PROXY_READ_TIMEOUT": "60s",
"REVERSE_PROXY_SEND_TIMEOUT": "60s",
"REVERSE_PROXY_INCLUDES": "",
"USE_PROXY_CACHE": "no",
"PROXY_CACHE_METHODS": "GET HEAD",
"PROXY_CACHE_MIN_USES": "2",
"PROXY_CACHE_KEY": "$scheme$host$request_uri",
"PROXY_CACHE_VALID": "200=24h 301=1h 302=24h",
"PROXY_NO_CACHE": "$http_pragma $http_authorization",
"PROXY_CACHE_BYPASS": "0",
"USE_REVERSE_SCAN": "no",
"REVERSE_SCAN_PORTS": "22 80 443 3128 8000 8080",
"REVERSE_SCAN_TIMEOUT": "500",
"GENERATE_SELF_SIGNED_SSL": "no",
"SELF_SIGNED_SSL_EXPIRY": "365",
"SELF_SIGNED_SSL_SUBJ": "/CN=www.example.com/",
"USE_UI": "no",
"USE_WHITELIST": "no",
"WHITELIST_IP": "20.191.45.212 40.88.21.235 40.76.173.151 40.76.163.7 20.185.79.47 52.142.26.175 20.185.79.15 52.142.24.149 40.76.162.208 40.76.163.23 40.76.162.191 40.76.162.247",
"WHITELIST_RDNS": ".google.com .googlebot.com .yandex.ru .yandex.net .yandex.com .search.msn.com .baidu.com .baidu.jp .crawl.yahoo.net .fwd.linkedin.com .twitter.com .twttr.com .discord.com",
"WHITELIST_RDNS_GLOBAL": "yes",
"WHITELIST_ASN": "32934",
"WHITELIST_USER_AGENT": "",
"WHITELIST_URI": ""
},
"low": {
"SERVER_NAME": "app1.example.com",
"SERVER_TYPE": "http",
"LISTEN_STREAM": "yes",
"LISTEN_STREAM_PORT": "1337",
"LISTEN_STREAM_PORT_SSL": "4242",
"USE_UDP": "no",
"IS_DRAFT": "no",
"USE_ANTIBOT": "no",
"ANTIBOT_URI": "/challenge",
"ANTIBOT_TIME_RESOLVE": "60",
"ANTIBOT_TIME_VALID": "86400",
"ANTIBOT_RECAPTCHA_SCORE": "0.7",
"ANTIBOT_RECAPTCHA_SITEKEY": "",
"ANTIBOT_RECAPTCHA_SECRET": "",
"ANTIBOT_HCAPTCHA_SITEKEY": "",
"ANTIBOT_HCAPTCHA_SECRET": "",
"ANTIBOT_TURNSTILE_SITEKEY": "",
"ANTIBOT_TURNSTILE_SECRET": "",
"USE_AUTH_BASIC": "no",
"AUTH_BASIC_LOCATION": "sitewide",
"AUTH_BASIC_USER": "changeme",
"AUTH_BASIC_PASSWORD": "changeme",
"AUTH_BASIC_TEXT": "Restricted area",
"USE_BAD_BEHAVIOR": "yes",
"BAD_BEHAVIOR_STATUS_CODES": "400 401 403 404 405 429 444",
"BAD_BEHAVIOR_THRESHOLD": "10",
"BAD_BEHAVIOR_COUNT_TIME": "60",
"BAD_BEHAVIOR_BAN_TIME": "86400",
"USE_BLACKLIST": "no",
"BLACKLIST_IP": "",
"BLACKLIST_RDNS": ".shodan.io .censys.io",
"BLACKLIST_RDNS_GLOBAL": "yes",
"BLACKLIST_ASN": "",
"BLACKLIST_USER_AGENT": "",
"BLACKLIST_URI": "",
"BLACKLIST_IGNORE_IP": "",
"BLACKLIST_IGNORE_RDNS": "",
"BLACKLIST_IGNORE_ASN": "",
"BLACKLIST_IGNORE_USER_AGENT": "",
"BLACKLIST_IGNORE_URI": "",
"USE_BROTLI": "no",
"BROTLI_TYPES": "application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml",
"BROTLI_MIN_LENGTH": "1000",
"BROTLI_COMP_LEVEL": "6",
"USE_BUNKERNET": "no",
"USE_CORS": "no",
"CORS_ALLOW_ORIGIN": "self",
"CORS_ALLOW_METHODS": "GET, POST, OPTIONS",
"CORS_ALLOW_HEADERS": "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range",
"CORS_ALLOW_CREDENTIALS": "no",
"CORS_EXPOSE_HEADERS": "Content-Length,Content-Range",
"CROSS_ORIGIN_OPENER_POLICY": "same-origin",
"CROSS_ORIGIN_EMBEDDER_POLICY": "require-corp",
"CROSS_ORIGIN_RESOURCE_POLICY": "same-site",
"CORS_MAX_AGE": "86400",
"CORS_DENY_REQUEST": "yes",
"USE_CLIENT_CACHE": "yes",
"CLIENT_CACHE_ETAG": "yes",
"CLIENT_CACHE_CONTROL": "public, max-age=15552000",
"BLACKLIST_COUNTRY": "",
"WHITELIST_COUNTRY": "",
"USE_CUSTOM_SSL": "no",
"CUSTOM_SSL_CERT": "",
"CUSTOM_SSL_KEY": "",
"CUSTOM_SSL_CERT_DATA": "",
"CUSTOM_SSL_KEY_DATA": "",
"USE_DNSBL": "yes",
"ERRORS": "",
"INTERCEPTED_ERROR_CODES": "400 401 403 404 405 413 429 500 501 502 503 504",
"USE_GREYLIST": "no",
"GREYLIST_IP": "",
"GREYLIST_RDNS": "",
"GREYLIST_RDNS_GLOBAL": "yes",
"GREYLIST_ASN": "",
"GREYLIST_USER_AGENT": "",
"GREYLIST_URI": "",
"USE_GZIP": "yes",
"GZIP_TYPES": "application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml",
"GZIP_MIN_LENGTH": "1000",
"GZIP_COMP_LEVEL": "5",
"GZIP_PROXIED": "no-cache no-store private expired auth",
"INJECT_BODY": "",
"CUSTOM_HEADER": "",
"CUSTOM_HEADER_2": "dzdz",
"REMOVE_HEADERS": "Server Expect-CT X-Powered-By X-AspNet-Version X-AspNetMvc-Version Public-Key-Pins",
"KEEP_UPSTREAM_HEADERS": "Content-Security-Policy Permissions-Policy X-Frame-Options",
"STRICT_TRANSPORT_SECURITY": "max-age=31536000; includeSubDomains; preload",
"COOKIE_FLAGS": "* HttpOnly SameSite=Lax",
"COOKIE_AUTO_SECURE_FLAG": "yes",
"CONTENT_SECURITY_POLICY": "object-src 'none'; form-action 'self'; frame-ancestors 'self';",
"CONTENT_SECURITY_POLICY_REPORT_ONLY": "no",
"REFERRER_POLICY": "strict-origin-when-cross-origin",
"PERMISSIONS_POLICY": "accelerometer=(), ambient-light-sensor=(), attribution-reporting=(), autoplay=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), compute-pressure=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), otp-credentials=(), payment=(), picture-in-picture=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), speaker-selection=(), storage-access=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()",
"X_FRAME_OPTIONS": "SAMEORIGIN",
"X_CONTENT_TYPE_OPTIONS": "nosniff",
"X_XSS_PROTECTION": "1; mode=block",
"AUTO_LETS_ENCRYPT": "no",
"EMAIL_LETS_ENCRYPT": "",
"USE_LETS_ENCRYPT_STAGING": "no",
"USE_LIMIT_REQ": "yes",
"LIMIT_REQ_URL": "/",
"LIMIT_REQ_RATE": "2r/s",
"USE_LIMIT_CONN": "yes",
"LIMIT_CONN_MAX_HTTP1": "10",
"LIMIT_CONN_MAX_HTTP2": "100",
"LIMIT_CONN_MAX_STREAM": "10",
"USE_METRICS": "yes",
"REDIRECT_HTTP_TO_HTTPS": "no",
"AUTO_REDIRECT_HTTP_TO_HTTPS": "yes",
"ALLOWED_METHODS": "GET|POST|HEAD",
"MAX_CLIENT_SIZE": "10m",
"SERVE_FILES": "no",
"ROOT_FOLDER": "",
"SSL_PROTOCOLS": "TLSv1.2 TLSv1.3",
"HTTP2": "yes",
"HTTP3": "no",
"HTTP3_ALT_SVC_PORT": "443",
"LISTEN_HTTP": "yes",
"USE_OPEN_FILE_CACHE": "no",
"OPEN_FILE_CACHE": "max=1000 inactive=20s",
"OPEN_FILE_CACHE_ERRORS": "yes",
"OPEN_FILE_CACHE_MIN_USES": "2",
"OPEN_FILE_CACHE_VALID": "30s",
"USE_MODSECURITY": "yes",
"USE_MODSECURITY_CRS": "yes",
"MODSECURITY_CRS_VERSION": "4",
"MODSECURITY_SEC_AUDIT_ENGINE": "RelevantOnly",
"MODSECURITY_SEC_RULE_ENGINE": "On",
"MODSECURITY_SEC_AUDIT_LOG_PARTS": "ABCFHZ",
"REMOTE_PHP": "",
"REMOTE_PHP_PATH": "",
"LOCAL_PHP": "",
"LOCAL_PHP_PATH": "",
"USE_REAL_IP": "no",
"USE_PROXY_PROTOCOL": "no",
"REAL_IP_FROM": "192.168.0.0/16 172.16.0.0/12 10.0.0.0/8",
"REAL_IP_HEADER": "X-Forwarded-For",
"REAL_IP_RECURSIVE": "yes",
"REDIRECT_TO": "",
"REDIRECT_TO_REQUEST_URI": "no",
"REDIRECT_TO_STATUS_CODE": "301",
"USE_REVERSE_PROXY": "yes",
"REVERSE_PROXY_INTERCEPT_ERRORS": "yes",
"REVERSE_PROXY_CUSTOM_HOST": "",
"REVERSE_PROXY_HOST": "http://app1:8080",
"REVERSE_PROXY_URL": "/",
"REVERSE_PROXY_WS": "no",
"REVERSE_PROXY_HEADERS": "",
"REVERSE_PROXY_HEADERS_CLIENT": "",
"REVERSE_PROXY_BUFFERING": "yes",
"REVERSE_PROXY_KEEPALIVE": "no",
"REVERSE_PROXY_AUTH_REQUEST": "",
"REVERSE_PROXY_AUTH_REQUEST_SIGNIN_URL": "",
"REVERSE_PROXY_AUTH_REQUEST_SET": "",
"REVERSE_PROXY_CONNECT_TIMEOUT": "60s",
"REVERSE_PROXY_READ_TIMEOUT": "60s",
"REVERSE_PROXY_SEND_TIMEOUT": "60s",
"REVERSE_PROXY_INCLUDES": "",
"USE_PROXY_CACHE": "no",
"PROXY_CACHE_METHODS": "GET HEAD",
"PROXY_CACHE_MIN_USES": "2",
"PROXY_CACHE_KEY": "$scheme$host$request_uri",
"PROXY_CACHE_VALID": "200=24h 301=1h 302=24h",
"PROXY_NO_CACHE": "$http_pragma $http_authorization",
"PROXY_CACHE_BYPASS": "0",
"USE_REVERSE_SCAN": "no",
"REVERSE_SCAN_PORTS": "22 80 443 3128 8000 8080",
"REVERSE_SCAN_TIMEOUT": "500",
"GENERATE_SELF_SIGNED_SSL": "no",
"SELF_SIGNED_SSL_EXPIRY": "365",
"SELF_SIGNED_SSL_SUBJ": "/CN=www.example.com/",
"USE_UI": "no",
"USE_WHITELIST": "no",
"WHITELIST_IP": "20.191.45.212 40.88.21.235 40.76.173.151 40.76.163.7 20.185.79.47 52.142.26.175 20.185.79.15 52.142.24.149 40.76.162.208 40.76.163.23 40.76.162.191 40.76.162.247",
"WHITELIST_RDNS": ".google.com .googlebot.com .yandex.ru .yandex.net .yandex.com .search.msn.com .baidu.com .baidu.jp .crawl.yahoo.net .fwd.linkedin.com .twitter.com .twttr.com .discord.com",
"WHITELIST_RDNS_GLOBAL": "yes",
"WHITELIST_ASN": "32934",
"WHITELIST_USER_AGENT": "",
"WHITELIST_URI": ""
}
}
},

View file

@ -3706,6 +3706,7 @@ total_config = {
"app1.example.com_LISTEN_STREAM": {"value": "yes", "global": True, "method": "default", "template": None},
"app1.example.com_REVERSE_PROXY_CUSTOM_HOST": {"value": "", "global": True, "method": "default", "template": None},
"app1.example.com_CUSTOM_HEADER": {"value": "", "global": True, "method": "default", "template": None},
"app1.example.com_CUSTOM_HEADER_2": {"value": "dzdz", "global": True, "method": "default", "template": None},
"app1.example.com_OPEN_FILE_CACHE_ERRORS": {"value": "yes", "global": True, "method": "default", "template": None},
"app1.example.com_LIMIT_REQ_URL": {"value": "/", "global": True, "method": "default", "template": None},
"app1.example.com_LIMIT_CONN_MAX_HTTP2": {"value": "100", "global": True, "method": "default", "template": None},

File diff suppressed because one or more lines are too long