updates
This commit is contained in:
@@ -4,10 +4,33 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<!-- Content Security Policy - Additional layer of XSS protection -->
|
||||
<!-- Allows HTTP localhost connections for development, HTTPS for production -->
|
||||
<!-- Note: Backend CSP headers (production only) will override/merge with this meta tag -->
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://js.stripe.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https: http: blob:; connect-src 'self' https: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:* wss: https://js.stripe.com https://hooks.stripe.com; frame-src 'self' https://js.stripe.com https://hooks.stripe.com; object-src 'none'; base-uri 'self'; form-action 'self';" />
|
||||
<!-- SECURITY: Security headers for payment pages and general security -->
|
||||
<meta http-equiv="X-Content-Type-Options" content="nosniff" />
|
||||
<meta http-equiv="X-Frame-Options" content="SAMEORIGIN" />
|
||||
<meta http-equiv="X-XSS-Protection" content="1; mode=block" />
|
||||
<!-- SECURITY: Prevent caching of sensitive pages (payment pages should set no-cache) -->
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<!-- SECURITY: Content Security Policy - XSS protection -->
|
||||
<!--
|
||||
IMPORTANT: This CSP is permissive for development compatibility.
|
||||
For production, the backend MUST set strict CSP headers that override this.
|
||||
|
||||
Production CSP should:
|
||||
- Remove 'unsafe-inline' and 'unsafe-eval' from script-src
|
||||
- Use nonces or hashes for inline scripts
|
||||
- Remove 'unsafe-inline' from style-src (use nonces)
|
||||
- Set report-uri for violation reporting
|
||||
|
||||
Current CSP allows:
|
||||
- unsafe-inline/unsafe-eval: Required for Vite HMR in development
|
||||
- ws://localhost: Required for Vite HMR websocket
|
||||
|
||||
Backend should set headers like:
|
||||
Content-Security-Policy: default-src 'self'; script-src 'self' 'nonce-{NONCE}' https://js.stripe.com ...; ...
|
||||
-->
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://js.stripe.com https://www.google.com https://www.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https: http: blob:; connect-src 'self' https: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:* wss: https://js.stripe.com https://hooks.stripe.com https://www.google.com; frame-src 'self' https://js.stripe.com https://hooks.stripe.com https://www.google.com; object-src 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests;" />
|
||||
<!-- Preconnect to external resources for faster loading -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
|
||||
Reference in New Issue
Block a user