Skip to content

Commit

Permalink
Improve CSP directive (#944)
Browse files Browse the repository at this point in the history
* Remove duplicate url from script-src

* Add tile.openstreetmap.org to directive
  • Loading branch information
YongGoose authored Feb 1, 2025
1 parent e54f2ae commit 0f05dea
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions baremaps-server/src/main/resources/dem/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org https://tile.openstreetmap.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
worker-src 'self' blob:;
child-src 'self' blob:;
img-src 'self' data: blob: http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
Expand Down
4 changes: 2 additions & 2 deletions baremaps-server/src/main/resources/static/server.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy" content="
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org https://tile.openstreetmap.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
worker-src 'self' blob:;
child-src 'self' blob:;
img-src 'self' data: blob: http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
Expand Down
4 changes: 2 additions & 2 deletions baremaps-server/src/main/resources/static/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy" content="
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org https://tile.openstreetmap.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
worker-src 'self' blob:;
child-src 'self' blob:;
img-src 'self' data: blob: http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
Expand Down
4 changes: 2 additions & 2 deletions basemap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy" content="
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org https://tile.openstreetmap.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
worker-src 'self' blob:;
child-src 'self' blob:;
img-src 'self' data: blob: http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
Expand Down
4 changes: 2 additions & 2 deletions examples/openstreetmap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy" content="
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
default-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org https://tile.openstreetmap.org;
script-src 'self' http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org 'unsafe-inline';
worker-src 'self' blob:;
child-src 'self' blob:;
img-src 'self' data: blob: http://127.0.0.1:* http://localhost:* https://unpkg.com https://baremaps.apache.org;
Expand Down

0 comments on commit 0f05dea

Please sign in to comment.