Skip to content

Commit 2b3b41d

Browse files
committed
fix: Adding wasm unsafe eval for pdfjs
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
1 parent 9cbc8bb commit 2b3b41d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/fibr/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func newConfig() configuration {
7474
health: health.Flags(fs, ""),
7575

7676
server: server.Flags(fs, "", flags.NewOverride("ReadTimeout", time.Minute*10), flags.NewOverride("WriteTimeout", time.Minute*10)),
77-
owasp: owasp.Flags(fs, "", flags.NewOverride("FrameOptions", "SAMEORIGIN"), flags.NewOverride("Csp", "default-src 'self'; base-uri 'self'; script-src 'self' 'httputils-nonce' unpkg.com/webp-hero@0.0.2/dist-cjs/ unpkg.com/leaflet@1.9.4/dist/ unpkg.com/leaflet.markercluster@1.5.1/ cdn.jsdelivr.net/npm/pdfjs-dist@6.1.200/; style-src 'self' 'httputils-nonce' unpkg.com/leaflet@1.9.4/dist/ unpkg.com/leaflet.markercluster@1.5.1/; img-src 'self' data: a.tile.openstreetmap.org b.tile.openstreetmap.org c.tile.openstreetmap.org; worker-src 'self' blob:")),
77+
owasp: owasp.Flags(fs, "", flags.NewOverride("FrameOptions", "SAMEORIGIN"), flags.NewOverride("Csp", "default-src 'self'; base-uri 'self'; script-src 'self' 'httputils-nonce' 'wasm-unsafe-eval' unpkg.com/webp-hero@0.0.2/dist-cjs/ unpkg.com/leaflet@1.9.4/dist/ unpkg.com/leaflet.markercluster@1.5.1/ cdn.jsdelivr.net/npm/pdfjs-dist@6.1.200/; style-src 'self' 'httputils-nonce' unpkg.com/leaflet@1.9.4/dist/ unpkg.com/leaflet.markercluster@1.5.1/; img-src 'self' data: a.tile.openstreetmap.org b.tile.openstreetmap.org c.tile.openstreetmap.org; worker-src 'self' blob:")),
7878
renderer: renderer.Flags(fs, "", flags.NewOverride("PublicURL", "http://127.0.0.1:1080"), flags.NewOverride("Title", "fibr"), flags.NewOverride("StaticPaths", []string{"/robots.txt", "/service-worker.js", "/browserconfig.xml", "/favicon.ico"})),
7979

8080
basic: basicMemory.Flags(fs, "auth", flags.NewOverride("Profiles", []string{"1:admin"})),

0 commit comments

Comments
 (0)