Skip to content

Commit 8c7ee80

Browse files
committed
fixes on fixes and csp worker header
1 parent 6622155 commit 8c7ee80

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/index.coffee

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ module.exports=(mode)->
1414
sf={}
1515
socketInfo={}
1616
port=process.env.PORT or 8080
17+
18+
app.use (req, res, next)->
19+
res.setHeader 'Content-Security-Policy', 'worker-src *'
20+
next()
21+
return
22+
1723
if mode is "production"
1824
app.use express.static "#{__dirname}/client/dist"
1925
else
@@ -127,7 +133,7 @@ module.exports=(mode)->
127133
[0,1,0]
128134
[0,-1,0]
129135
]
130-
if socketInfo[socket.id].held isnt undefined socketInfo[socket.id].held isnt null
136+
if socketInfo[socket.id].held isnt undefined and socketInfo[socket.id].held isnt null
131137
console.log socketInfo[socket.id].held
132138
bot().placeBlock block,new vec3(vec...),(r)->
133139
console.log r

0 commit comments

Comments
 (0)