-
Notifications
You must be signed in to change notification settings - Fork 27
Apply security policy in Caddy #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
joostfarla
wants to merge
28
commits into
main
Choose a base branch
from
csp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
e8d4dbd
Apply security policy in Caddy
joostfarla 77a50b1
Remove inline styles
joostfarla 9e59474
Allow data URLs for images
joostfarla 166e77e
Minor CSP improvements
joostfarla bf4fe42
Add style hashes for rijkshuisstijl
joostfarla 25b404b
Merge branch 'main' of github.com:developer-overheid-nl/don-site into…
joostfarla 7381119
Update style hashes
joostfarla 250d7e8
Generate static assets for Mermaid diagrams
joostfarla f326440
Merge branch 'main' of github.com:developer-overheid-nl/don-site into…
joostfarla 0eeaf1b
Separate CSS components
joostfarla f793aea
Fix CSS
joostfarla 9da5dfb
SiteLogo component
joostfarla 524999f
Cleanup + media queries
joostfarla a9817ac
Caddyfile formatting
joostfarla 24dd8b3
Docfix
joostfarla 7d822b0
Readme + dependency check
joostfarla 9479c2a
Move mermaid folder
joostfarla b39e13b
Merge branch 'main' of github.com:developer-overheid-nl/don-site into…
joostfarla 67bd551
Merge branch 'main' into csp
6600378
Merge branch 'main' into csp
b1c5a0c
Moar shas and goatcounter in csp
f110edd
patched docusaurus for csp fix
bd82dab
Merge branch 'main' into csp
38d9f9f
Added url and changed some urls to relative urls
589450f
Added search url to connect-src
b052132
Test if `<BrowserOnly>` code blocks fix CSP issues
2fd5d94
fix: remove inline styling for Grid component
tomootes e5cb49c
config: add youtube as allowed frame source
tomootes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,35 @@ | ||
|
|
||
| { | ||
| auto_https off | ||
| auto_https off | ||
| } | ||
|
|
||
| :3000 { | ||
| root * /var/docusaurus | ||
| encode gzip | ||
| try_files {path} {path}/index.html | ||
| handle_errors 404 { | ||
| rewrite * /404.html | ||
| file_server | ||
| } | ||
| file_server | ||
| header -Server | ||
| header /blog/feed.json Cache-Control "no-cache" | ||
| header /agenda/events.json Cache-Control "no-cache" | ||
| root * /var/docusaurus | ||
| encode gzip | ||
| try_files {path} {path}/index.html | ||
| handle_errors 404 { | ||
| rewrite * /404.html | ||
| file_server | ||
| } | ||
| file_server | ||
| header -Server | ||
|
|
||
| # Caching policy | ||
| header /blog/feed.json Cache-Control "no-cache" | ||
| header /agenda/events.json Cache-Control "no-cache" | ||
|
|
||
| # Security policy | ||
| header { | ||
| Content-Security-Policy " | ||
| default-src 'self'; | ||
| script-src 'self' 'sha256-B3XU3apKRxGUkcZIC2hb7S3n+DLs/vKwgVEnWv1EzR0=' 'sha256-pBkmluod9Ko4GzDfbWgKM/wxzujFXUdGVOePkwOQT+c=' https://gc.zgo.at/count.js; | ||
| connect-src 'self' https://search.developer.overheid.nl https://donv1.goatcounter.com; | ||
| img-src 'self' data: https://www.geonovum.nl https://social.overheid.nl https://github.com https://avatars.githubusercontent.com https://hostux.social https://i.vimeocdn.com https://www.toegankelijkheidsverklaring.nl; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Door github.com in je CSP te zetten verzwak je de sterke ervan, gezien github best 'world-writable' is. Al is dat voor afbeeldingen minder spannend dan voor andere zaken. |
||
| style-src 'self' 'sha256-biLFinpqYMtWHmXfkA1BPeCY0/fNt46SAZ+BBk5YUog=' 'sha256-DPptftRbDC0ow/ZdJW8fpmEcrpsn75dOuGlyzJJwTgc=' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='; | ||
| frame-src https://player.vimeo.com youtube.com www.youtube.com;" | ||
| Cross-Origin-Opener-Policy: "same-origin" | ||
| Cross-Origin-Resource-Policy: "same-site" | ||
| Referrer-Policy: "strict-origin-when-cross-origin" | ||
| X-Content-Type-Options: "nosniff" | ||
| X-Frame-Options: "DENY" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/lib/index.js b/lib/index.js | ||
| index 5aecec76fc6f8f1e9b433c31d6b690da706b6abc..82c9294f808e7277a6717cec86ad1b3f6766ab1c 100644 | ||
| --- a/lib/index.js | ||
| +++ b/lib/index.js | ||
| @@ -90,7 +90,7 @@ function themeClassic(context, options) { | ||
| tagName: 'svg', | ||
| attributes: { | ||
| xmlns: 'http://www.w3.org/2000/svg', | ||
| - style: 'display: none;', | ||
| + class: 'hidden', | ||
| }, | ||
| innerHTML: inlineSvgSprites_1.SvgSpriteDefs, | ||
| }, |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wellicht is het nuttig om de count.js zelf te hosten? Dan wel gebruik te maken van de rijksoverheid piwik? Zelfde geld natuurlijk voor de connect-src stanza hieronder en in het algemeen voor goatcounter ipv piwik.