Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -55,8 +55,8 @@ def apply_security_headers(response):
|
|
| 55 |
response.headers['Strict-Transport-Security'] = 'max-age=31536000; includeSubDomains'
|
| 56 |
response.headers['X-Content-Type-Options'] = 'nosniff'
|
| 57 |
response.headers['X-XSS-Protection'] = '1; mode=block'
|
| 58 |
-
# Allow framing from
|
| 59 |
-
response.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob:; img-src 'self' data: blob:; connect-src 'self'; frame-ancestors 'self' https://truelens.surge.sh;"
|
| 60 |
response.headers['Referrer-Policy'] = 'strict-origin-when-cross-origin'
|
| 61 |
|
| 62 |
# Absolute zero-caching for inference results to maintain privacy
|
|
|
|
| 55 |
response.headers['Strict-Transport-Security'] = 'max-age=31536000; includeSubDomains'
|
| 56 |
response.headers['X-Content-Type-Options'] = 'nosniff'
|
| 57 |
response.headers['X-XSS-Protection'] = '1; mode=block'
|
| 58 |
+
# Allow framing from Hugging Face & Surge, and allow external fonts/styles
|
| 59 |
+
response.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob: https://fonts.googleapis.com https://fonts.gstatic.com; img-src 'self' data: blob:; connect-src 'self' https://huggingface.co; frame-ancestors 'self' https://truelens.surge.sh https://huggingface.co;"
|
| 60 |
response.headers['Referrer-Policy'] = 'strict-origin-when-cross-origin'
|
| 61 |
|
| 62 |
# Absolute zero-caching for inference results to maintain privacy
|