Revert "Bugfix: fix typescript issues"

This commit is contained in:
Christopher Chedeau 2020-10-21 16:33:47 -07:00 committed by GitHub
parent 4cf53f1d55
commit a705e631b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "excalidraw-room", "name": "excalidraw-room",
"version": "1.0.1", "version": "1.0.0",
"description": "Excalidraw collaboration server", "description": "Excalidraw collaboration server",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -17,11 +17,11 @@ server.listen(port, () => {
}); });
const io = socketIO(server, { const io = socketIO(server, {
handlePreflightRequest: function (server, req, res) { handlePreflightRequest: function (req, res) {
var headers = { var headers = {
"Access-Control-Allow-Headers": "Content-Type, Authorization", "Access-Control-Allow-Headers": "Content-Type, Authorization",
"Access-Control-Allow-Origin": req.headers ? req.headers.origin : "*", "Access-Control-Allow-Origin": req.header ? req.header.origin : "*",
"Access-Control-Allow-Credentials": "true", "Access-Control-Allow-Credentials": true,
}; };
res.writeHead(200, headers); res.writeHead(200, headers);
res.end(); res.end();