mirror of
https://github.com/13hannes11/hugo-coder-timeline.git
synced 2024-09-04 00:50:58 +02:00
Adds Content-Security-Policy template to theme (#504)
* feat: added csp.html template to theme head element * feat: added my name to CONTRIBUTORS * fix: added conditional logic for templating to stabilize build * feat: Added CSP section to example config.toml * fix: updated template logic * updated contributors to reference website and not github * fix conflict with contributors, moved csp out of _shared dir Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
This commit is contained in:
@@ -80,6 +80,25 @@ disqusShortname = "yourdiscussshortname"
|
||||
[params.cloudflare]
|
||||
token = "token"
|
||||
|
||||
# If you want to implement a Content-Security-Policy, add this section
|
||||
[params.csp]
|
||||
childsrc = ["'self'"]
|
||||
fontsrc=["'self'",
|
||||
"https://fonts.gstatic.com",
|
||||
"https://cdn.jsdelivr.net/"]
|
||||
formaction = ["'self'"]
|
||||
framesrc = ["'self'"]
|
||||
imgsrc = ["'self'"]
|
||||
objectsrc = ["'none'"]
|
||||
stylesrc = ["'self'",
|
||||
"'unsafe-inline'",
|
||||
"https://fonts.googleapis.com/",
|
||||
"https://cdn.jsdelivr.net/"]
|
||||
scriptsrc = ["'self'",
|
||||
"'unsafe-inline'",
|
||||
"https://www.google-analytics.com"]
|
||||
prefetchsrc = ["'self'"]
|
||||
|
||||
[taxonomies]
|
||||
category = "categories"
|
||||
series = "series"
|
||||
|
||||
Reference in New Issue
Block a user