Skip to content

Commit

Permalink
fix CSP connect-src
Browse files Browse the repository at this point in the history
  • Loading branch information
david-fong committed Nov 8, 2020
1 parent 79ba536 commit 4694763
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion client/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!doctype html><html lang="en"><head><title>snakey3</title><meta name="author" content="David Fong"/><meta name="description" content="A multiplayer typing game for learning written languages."/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="referrer" content="same-origin"/><meta charset="UTF-8"/><meta http-equiv="Content-Security-Policy" content="child-src 'none'; object-src 'none'; base-uri 'none'; connect-src 'self' snakey3.herokuapp.com;"/><link rel="icon" href="./favicon.png"><link href="./_barrel.css" rel="stylesheet"><meta name="og:title" content="snakey3"/><meta name="og:description" content="A multiplayer typing game for learning written languages."/><meta name="og:image" content="https://raw.githubusercontent.com/david-fong/snakey3/dev/assets/images/screenshots/snakey_version3_blanktitle.png"/><link rel="prefetch" as="script" id="socket.io-preload" href="./vendor/socket.io.js"/><link rel="preload" as="script" href="./index.js"/></head><body class="fill-parent"><datalist id="public-game-hosts-list"><option value="snakey3.herokuapp.com"></option></datalist><script>{ // Load up last used colour scheme (or default):
<!doctype html><html lang="en"><head><title>snakey3</title><meta name="author" content="David Fong"/><meta name="description" content="A multiplayer typing game for learning written languages."/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="referrer" content="same-origin"/><meta charset="UTF-8"/><meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval'; child-src 'none'; object-src 'none'; base-uri 'none'; connect-src 'self' wss://snakey3.herokuapp.com/socket.io/;"/><link rel="icon" href="./favicon.png"><link href="./_barrel.css" rel="stylesheet"><meta name="og:title" content="snakey3"/><meta name="og:description" content="A multiplayer typing game for learning written languages."/><meta name="og:image" content="https://raw.githubusercontent.com/david-fong/snakey3/dev/assets/images/screenshots/snakey_version3_blanktitle.png"/><link rel="prefetch" as="script" id="socket.io-preload" href="./vendor/socket.io.js"/><link rel="preload" as="script" href="./index.js"/></head><body class="fill-parent"><datalist id="public-game-hosts-list"><option value="https://snakey3.herokuapp.com"></option></datalist><script>// TODO.build move to separate file and remove CSP 'unsafe-inline'
{ // Load up last used colour scheme (or default):
const cssl = JSON.parse(localStorage.getItem("colourSchemeStyleLiteral"));
const root = document.documentElement;
if (cssl) { root.setAttribute("style", cssl); }
Expand Down
2 changes: 1 addition & 1 deletion client/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"typing",
"game"
],
"version": "0.8.0",
"version": "0.8.1",
"dependencies": {
"express": "^4.17.1",
"socket.io": "^3.0.0",
Expand Down

0 comments on commit 4694763

Please sign in to comment.