Spaces:
Sleeping
Sleeping
Fix CSV uploads behind Hugging Face proxy
Browse filesDisable Streamlit direct-origin XSRF and CORS enforcement because Hugging Face terminates TLS and proxies the public Space origin.
- .streamlit/config.toml +15 -11
.streamlit/config.toml
CHANGED
|
@@ -1,11 +1,15 @@
|
|
| 1 |
-
[theme]
|
| 2 |
-
primaryColor = "#6045D8"
|
| 3 |
-
backgroundColor = "#FBFAFF"
|
| 4 |
-
secondaryBackgroundColor = "#F4F1FF"
|
| 5 |
-
textColor = "#172033"
|
| 6 |
-
font = "sans serif"
|
| 7 |
-
|
| 8 |
-
[server]
|
| 9 |
-
headless = true
|
| 10 |
-
maxUploadSize = 25
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[theme]
|
| 2 |
+
primaryColor = "#6045D8"
|
| 3 |
+
backgroundColor = "#FBFAFF"
|
| 4 |
+
secondaryBackgroundColor = "#F4F1FF"
|
| 5 |
+
textColor = "#172033"
|
| 6 |
+
font = "sans serif"
|
| 7 |
+
|
| 8 |
+
[server]
|
| 9 |
+
headless = true
|
| 10 |
+
maxUploadSize = 25
|
| 11 |
+
# Hugging Face terminates TLS and forwards requests through its Space proxy.
|
| 12 |
+
# Streamlit cannot validate its direct-origin XSRF cookie across that boundary,
|
| 13 |
+
# which otherwise makes the file-upload endpoint return HTTP 403.
|
| 14 |
+
enableXsrfProtection = false
|
| 15 |
+
enableCORS = false
|