mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-11-23 22:15:46 +00:00
csp headers and img compression
This commit is contained in:
parent
fd67a9fa42
commit
fd32f5be32
BIN
static/cache/img/icon-trans.png
vendored
BIN
static/cache/img/icon-trans.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 142 KiB |
BIN
static/cache/img/icon.png
vendored
BIN
static/cache/img/icon.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 455 KiB After Width: | Height: | Size: 224 KiB |
4
templates/components/headers/csp.html
Normal file
4
templates/components/headers/csp.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<meta
|
||||||
|
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';"
|
||||||
|
/>
|
||||||
@ -1,2 +1,8 @@
|
|||||||
<. include!("./raw-headers.html"); .>
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<. include!("./preview-data.html"); .>
|
||||||
|
<. include!("./favicon.html"); .>
|
||||||
|
<. include!("./csp.html"); .>
|
||||||
|
</head>
|
||||||
<body class="layout">
|
<body class="layout">
|
||||||
|
|||||||
43
templates/components/headers/preview-data.html
Normal file
43
templates/components/headers/preview-data.html
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<meta charset="UTF-8" />
|
||||||
|
<title><.= PAGE .> | <.= crate::pages::NAME .></title>
|
||||||
|
<meta name="referrer" content="no-referrer-when-downgrade" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<meta name="author" content="Aravinth Manivannan" />
|
||||||
|
<meta name="twitter:card" value="summary_large_image" />
|
||||||
|
<meta name="twitter:site" content="@realaravinth" />
|
||||||
|
<meta
|
||||||
|
name="twitter:title"
|
||||||
|
content="<.= PAGE .> | <.= crate::pages::NAME .>"
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
name="twitter:description"
|
||||||
|
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
||||||
|
/>
|
||||||
|
<meta name="twitter:creator" content="@realaravinth" />
|
||||||
|
<meta name="twitter:image"
|
||||||
|
content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<meta
|
||||||
|
property="og:title"
|
||||||
|
content="<.= PAGE .> | <.= crate::pages::NAME .>"
|
||||||
|
/>
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:url" content="https://mcaptcaha.org" />
|
||||||
|
<meta property="og:image"
|
||||||
|
content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<meta
|
||||||
|
property="og:description"
|
||||||
|
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
||||||
|
/>
|
||||||
|
<meta property="og:site_name"
|
||||||
|
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
||||||
|
/>
|
||||||
@ -1,49 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<title><.= PAGE .> | <.= crate::pages::NAME .></title>
|
|
||||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
|
|
||||||
<meta
|
|
||||||
name="description"
|
|
||||||
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<meta name="author" content="Aravinth Manivannan" />
|
|
||||||
<meta name="twitter:card" value="summary_large_image" />
|
|
||||||
<meta name="twitter:site" content="@realaravinth" />
|
|
||||||
<meta
|
|
||||||
name="twitter:title"
|
|
||||||
content="<.= PAGE .> | <.= crate::pages::NAME .>"
|
|
||||||
/>
|
|
||||||
<meta
|
|
||||||
name="twitter:description"
|
|
||||||
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
|
||||||
/>
|
|
||||||
<meta name="twitter:creator" content="@realaravinth" />
|
|
||||||
<meta name="twitter:image"
|
|
||||||
content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<meta
|
|
||||||
property="og:title"
|
|
||||||
content="<.= PAGE .> | <.= crate::pages::NAME .>"
|
|
||||||
/>
|
|
||||||
<meta property="og:type" content="article" />
|
|
||||||
<meta property="og:url" content="https://mcaptcaha.org" />
|
|
||||||
<meta property="og:image"
|
|
||||||
content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<meta
|
|
||||||
property="og:description"
|
|
||||||
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
|
||||||
/>
|
|
||||||
<meta property="og:site_name"
|
|
||||||
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<. include!("./favicon.html"); .>
|
|
||||||
</head>
|
|
||||||
6
templates/components/headers/widget-headers.html
Normal file
6
templates/components/headers/widget-headers.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<. include!("./preview-data.html"); .>
|
||||||
|
<. include!("./favicon.html"); .>
|
||||||
|
</head>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<. include!("../components/headers/raw-headers.html"); .>
|
<. include!("../components/headers/widget-headers.html"); .>
|
||||||
<body>
|
<body>
|
||||||
<form class="widget__contaienr">
|
<form class="widget__contaienr">
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|||||||
@ -18,8 +18,8 @@
|
|||||||
@import '../reset';
|
@import '../reset';
|
||||||
|
|
||||||
.widget__contaienr {
|
.widget__contaienr {
|
||||||
max-width: 350px;
|
max-width: 300px;
|
||||||
max-height: 90px;
|
max-height: 74px;
|
||||||
display: flex;
|
display: flex;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@ -73,18 +73,19 @@
|
|||||||
|
|
||||||
.widget__mcaptcha-logo-container {
|
.widget__mcaptcha-logo-container {
|
||||||
flex: 2;
|
flex: 2;
|
||||||
padding-top: 5px;
|
padding-top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget__mcaptcha-brand-name {
|
.widget__mcaptcha-brand-name {
|
||||||
font-size: 0.6rem;
|
font-size: 0.7rem;
|
||||||
|
font-weight: 600;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget__mcaptcha-logo {
|
.widget__mcaptcha-logo {
|
||||||
display: block;
|
display: block;
|
||||||
width: 45px;
|
width: 35px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,5 +96,5 @@
|
|||||||
|
|
||||||
.widget__mcaptcha-info-link {
|
.widget__mcaptcha-info-link {
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
margin: 5px;
|
margin: 2px;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user