diff --git a/.gitignore b/.gitignore index e97303a..39d05a8 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,7 @@ node_modules/ # Copied in by the Docker build; never committed. /cmd/verdande/webbuild/ + +# Frontend build output and dependencies +/web/build/ +/web/.svelte-kit/ diff --git a/internal/httpapi/csp.go b/internal/httpapi/csp.go new file mode 100644 index 0000000..0a88430 --- /dev/null +++ b/internal/httpapi/csp.go @@ -0,0 +1,86 @@ +package httpapi + +import ( + "crypto/sha256" + "encoding/base64" + "io/fs" + "regexp" + "strings" +) + +// inlineScript matches a `) + +// hasSrc distinguishes + %sveltekit.head% + +
+