Skip to content

Commit ce9d452

Browse files
Merge pull request #998 from streamlit/csp-headers
Add CSP headers for Algolia search
2 parents d1ea79f + 1302967 commit ce9d452

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

netlify.toml

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ connect-src \
2828
https://*.auryc.com/ \
2929
https://www.google-analytics.com/ \
3030
https://stats.g.doubleclick.net/ \
31+
https://*.algolia.net/ \
32+
https://*.algolianet.com/ \
3133
; \
3234
default-src 'none' ; \
3335
font-src 'self' ; \
@@ -52,6 +54,8 @@ script-src \
5254
https://identity.netlify.com/ \
5355
https://netlify-cdp-loader.netlify.app/netlify.js \
5456
https://www.youtube.com/iframe_api/ \
57+
https://*.algolia.net/ \
58+
https://*.algolianet.com/ \
5559
; \
5660
style-src \
5761
'self' \

next.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const CSP_HEADER = [
2020
"https://*.auryc.com/", // Analytics (Heap)
2121
"https://www.google-analytics.com/", // Analytics
2222
"https://stats.g.doubleclick.net/", // Analytics
23+
"https://*.algolia.net/", // Search
24+
"https://*.algolianet.com/", // Search
2325
";",
2426
"default-src 'none';",
2527
"font-src 'self';",
@@ -44,6 +46,8 @@ const CSP_HEADER = [
4446
"https://identity.netlify.com/", // Netlify dev tools
4547
"https://netlify-cdp-loader.netlify.app/netlify.js", // Netlify dev tools
4648
"https://www.youtube.com/iframe_api/", // YouTube Embed
49+
"https://*.algolia.net/", // Search
50+
"https://*.algolianet.com/", // Search
4751
";",
4852
"style-src",
4953
"'self'",

0 commit comments

Comments
 (0)