commit: 741a59e0cc4047487aee03e292329ff9ac17bbd6
parent 0e56ac1c2ba198cd6c91586803758ed0e88cab38
Author: Tusooa Zhu <tusooa@kazv.moe>
Date: Wed, 6 Apr 2022 18:50:33 -0400
Fix phoenix sockets in dev mode
phoenix requires the Origin header to be set to the actual address,
so "http://localhost:xxxx" will not work.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/config/index.js b/config/index.js
@@ -52,7 +52,10 @@ module.exports = {
target,
changeOrigin: true,
cookieDomainRewrite: 'localhost',
- ws: true
+ ws: true,
+ headers: {
+ 'Origin': target
+ }
},
'/oauth/revoke': {
target,