Skip to content

Commit 5856353

Browse files
author
Tonny@Home
committed
add SECURITY HEADERS for landing page
1 parent 8355cbd commit 5856353

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

landing/index.html

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,44 @@
77
<title>QuantPits — Where Alphas Are Forged</title>
88
<meta name="description"
99
content="QuantPits is a production-ready quantitative trading system built on Microsoft Qlib. End-to-end pipeline with ensemble modeling, workspace isolation, and interactive dashboards." />
10+
11+
<!-- ===== SECURITY HEADERS ===== -->
12+
<!-- CSP: strict allowlist, only permit Google Fonts external resources -->
13+
<meta http-equiv="Content-Security-Policy" content="default-src 'none';
14+
script-src 'unsafe-inline';
15+
style-src 'unsafe-inline' https://fonts.googleapis.com;
16+
font-src https://fonts.gstatic.com;
17+
img-src 'self' data:;
18+
connect-src 'none';
19+
frame-src 'none';
20+
object-src 'none';
21+
base-uri 'self';
22+
form-action 'none';" />
23+
<!-- Referrer: send origin only on cross-origin, full URL on same-origin -->
24+
<meta name="referrer" content="strict-origin-when-cross-origin" />
25+
<!-- Permissions Policy: disable all device APIs -->
26+
<meta http-equiv="Permissions-Policy"
27+
content="camera=(), microphone=(), geolocation=(), payment=(), usb=(), magnetometer=(), gyroscope=(), accelerometer=()" />
28+
<!--
29+
NOTE: The following headers CANNOT be set via <meta> tags.
30+
If using Cloudflare/CDN in front of GitHub Pages, configure them
31+
as HTTP response headers via Transform Rules:
32+
X-Frame-Options: DENY
33+
X-Content-Type-Options: nosniff
34+
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
35+
Cross-Origin-Opener-Policy: same-origin
36+
Cross-Origin-Resource-Policy: same-origin
37+
38+
SRI (Subresource Integrity) is intentionally NOT applied to Google Fonts
39+
because their CSS payload varies by user-agent (serving woff2 vs woff etc.),
40+
making integrity hashes unstable across browsers.
41+
-->
42+
1043
<link rel="preconnect" href="https://fonts.googleapis.com" />
1144
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1245
<link
1346
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap"
14-
rel="stylesheet" />
47+
rel="stylesheet" crossorigin="anonymous" referrerpolicy="no-referrer" />
1548
<style>
1649
/* ===== CSS RESET & BASE ===== */
1750
*,

0 commit comments

Comments
 (0)