mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-11-24 14:35:46 +00:00
strict transport policy heaer
This commit is contained in:
parent
6763867cbe
commit
65ffc37549
@ -14,6 +14,10 @@ ip= "0.0.0.0"
|
|||||||
# enter your hostname, eg: example.com
|
# enter your hostname, eg: example.com
|
||||||
domain = "localhost"
|
domain = "localhost"
|
||||||
allow_registration = true
|
allow_registration = true
|
||||||
|
# Set true if you have setup TLS with a reverse proxy like Nginx.
|
||||||
|
# Does HTTPS redirect and sends additional headers that can only be used if
|
||||||
|
# HTTPS available to improve security
|
||||||
|
proxy_has_tls = false
|
||||||
#url_prefix = ""
|
#url_prefix = ""
|
||||||
|
|
||||||
[pow]
|
[pow]
|
||||||
|
|||||||
@ -30,6 +30,7 @@ pub struct Server {
|
|||||||
pub cookie_secret: String,
|
pub cookie_secret: String,
|
||||||
pub ip: String,
|
pub ip: String,
|
||||||
pub url_prefix: Option<String>,
|
pub url_prefix: Option<String>,
|
||||||
|
pub proxy_has_tls: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
<!--
|
|
||||||
<meta
|
<meta
|
||||||
http-equiv="Content-Security-Policy"
|
http-equiv="Content-Security-Policy"
|
||||||
content="default-src 'self' *.mcaptcha.org mcaptcha.org mcaptcha.io *.mcaptcha.io; img-src 'self'; style-src 'self'; child-src 'none'; script-src 'self';"
|
content="default-src 'self' *.mcaptcha.org mcaptcha.org mcaptcha.io *.mcaptcha.io; img-src 'self'; style-src 'self'; child-src 'none'; script-src 'self';"
|
||||||
/>
|
/>
|
||||||
-->
|
|
||||||
|
|||||||
3
templates/components/headers/https.html
Normal file
3
templates/components/headers/https.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<meta
|
||||||
|
http-equiv="Strict-Transport-Security" content="max-age=63072000"
|
||||||
|
/>
|
||||||
@ -4,5 +4,8 @@
|
|||||||
<. include!("./preview-data.html"); .>
|
<. include!("./preview-data.html"); .>
|
||||||
<. include!("./favicon.html"); .>
|
<. include!("./favicon.html"); .>
|
||||||
<. include!("./csp.html"); .>
|
<. include!("./csp.html"); .>
|
||||||
|
<. if crate::SETTINGS.server.proxy_has_tls { .>
|
||||||
|
<. include!("./https.html"); .>
|
||||||
|
<. } .>
|
||||||
</head>
|
</head>
|
||||||
<body class="layout">
|
<body class="layout">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user