aboutsummaryrefslogtreecommitdiff
path: root/back
diff options
context:
space:
mode:
authorAnthony Wang2022-01-12 14:36:59 -0600
committerAnthony Wang2022-01-12 14:36:59 -0600
commitf4d4d16b87272c728a138475659d9c5f67ecd090 (patch)
tree09241f473287571b3f7bec533b696f85dffe80a2 /back
parent63b522b6d23cbeb3aefe5125ef8f489a49266d50 (diff)
Move SSL to proxy so we don't need sudo for backend
Diffstat (limited to 'back')
-rw-r--r--back/src/server.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/back/src/server.ts b/back/src/server.ts
index fca32d1..c73162a 100644
--- a/back/src/server.ts
+++ b/back/src/server.ts
@@ -3,9 +3,9 @@ import http from 'http';
import https from 'https';
import {Server} from 'socket.io';
-// export default new Server({cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}});
+export default new Server({cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}});
-const base = process.env.SSL_KEY && process.env.SSL_CERT && process.env.SSL_CA ? https.createServer({
+/*const base = process.env.SSL_KEY && process.env.SSL_CERT && process.env.SSL_CA ? https.createServer({
"key": fs.readFileSync(process.env.SSL_KEY),
"cert": fs.readFileSync(process.env.SSL_CERT),
"ca": fs.readFileSync(process.env.SSL_CA)
@@ -14,4 +14,4 @@ base.listen(+process.env.PORT!, '0.0.0.0', () => {
console.log(`Listening on port ${process.env.PORT}`);
});
-export default new Server(base, {cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}});
+export default new Server(base, {cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}});*/