From 741a59e0cc4047487aee03e292329ff9ac17bbd6 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 6 Apr 2022 18:50:33 -0400 Subject: [PATCH] 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. --- config/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/index.js b/config/index.js index 7cb87c3b36..023d4c9bce 100644 --- 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,