diff options
| author | Tusooa Zhu <tusooa@kazv.moe> | 2022-04-06 18:50:33 -0400 |
|---|---|---|
| committer | Tusooa Zhu <tusooa@kazv.moe> | 2022-04-06 18:52:16 -0400 |
| commit | 741a59e0cc4047487aee03e292329ff9ac17bbd6 (patch) | |
| tree | 3647be226356968ef457fa9a8c593d51303461bf /config/index.js | |
| parent | 0e56ac1c2ba198cd6c91586803758ed0e88cab38 (diff) | |
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 (limited to 'config/index.js')
| -rw-r--r-- | config/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/index.js b/config/index.js index 7cb87c3b..023d4c9b 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, |
