Skip to content

Commit

Permalink
fix: Fixing signup css nonce
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Oct 15, 2021
1 parent 98dea35 commit 6145c27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Usage of ketchup:
-corsOrigin string
[cors] Access-Control-Allow-Origin {KETCHUP_CORS_ORIGIN} (default "*")
-csp string
[owasp] Content-Security-Policy {KETCHUP_CSP} (default "default-src 'self'; base-uri 'self'; script-src 'self' 'nonce-ketchup-js-main' 'nonce-ketchup-js-create'; style-src 'self' 'nonce-ketchup-css-main' 'nonce-ketchup-css-ketchups' 'nonce-ketchup-css-suggests'")
[owasp] Content-Security-Policy {KETCHUP_CSP} (default "default-src 'self'; base-uri 'self'; script-src 'self' 'nonce-ketchup-js-main' 'nonce-ketchup-js-create'; style-src 'self' 'nonce-ketchup-css-main' 'nonce-ketchup-css-ketchups' 'nonce-ketchup-css-suggests' 'nonce-ketchup-css-signup'")
-dbHost string
[db] Host {KETCHUP_DB_HOST}
-dbMaxConn uint
Expand Down
2 changes: 1 addition & 1 deletion cmd/ketchup/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {
alcotestConfig := alcotest.Flags(fs, "")
loggerConfig := logger.Flags(fs, "logger")
prometheusConfig := prometheus.Flags(fs, "prometheus", flags.NewOverride("Gzip", false))
owaspConfig := owasp.Flags(fs, "", flags.NewOverride("Csp", "default-src 'self'; base-uri 'self'; script-src 'self' 'nonce-ketchup-js-main' 'nonce-ketchup-js-create'; style-src 'self' 'nonce-ketchup-css-main' 'nonce-ketchup-css-ketchups' 'nonce-ketchup-css-suggests'"))
owaspConfig := owasp.Flags(fs, "", flags.NewOverride("Csp", "default-src 'self'; base-uri 'self'; script-src 'self' 'nonce-ketchup-js-main' 'nonce-ketchup-js-create'; style-src 'self' 'nonce-ketchup-css-main' 'nonce-ketchup-css-ketchups' 'nonce-ketchup-css-suggests' 'nonce-ketchup-css-signup'"))
corsConfig := cors.Flags(fs, "cors")
rendererConfig := renderer.Flags(fs, "", flags.NewOverride("Title", "Ketchup"), flags.NewOverride("PublicURL", "https://ketchup.vibioh.fr"))

Expand Down
2 changes: 1 addition & 1 deletion cmd/ketchup/templates/public.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{{ end }}

{{ define "signup" }}
<style>
<style type="text/css" nonce="ketchup-css-signup">
.active-link {
color: var(--primary);
}
Expand Down

0 comments on commit 6145c27

Please sign in to comment.