chore: use 127.0.0.1 instead of localhost in setupProxy.js (#611)

This commit is contained in:
Thebora Kompanioni 2023-05-08 09:13:08 +00:00 committed by GitHub
parent 4d9171e15f
commit b5f9b3f6eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ const SUPPORTED_BACKENDS = [BACKEND_NATIVE, BACKEND_STANDALONE]
const {
PUBLIC_URL = '',
JAM_BACKEND = 'native',
JAM_BACKEND = BACKEND_NATIVE,
JMWALLETD_API_PORT = '28183',
JMWALLETD_WEBSOCKET_PORT = '28283',
JMOBWATCH_PORT = '62601',
@ -33,7 +33,7 @@ module.exports = (app) => {
*/
app.use(
createProxyMiddleware(`${PUBLIC_URL}/jmws`, {
target: `https://localhost:${JMWALLETD_WEBSOCKET_PORT}`,
target: `https://127.0.0.1:${JMWALLETD_WEBSOCKET_PORT}`,
pathRewrite: { [`^${PUBLIC_URL}/jmws`]: '' },
changeOrigin: true,
secure: false,
@ -42,7 +42,7 @@ module.exports = (app) => {
)
app.use(
createProxyMiddleware(`${PUBLIC_URL}/api/`, {
target: `https://localhost:${JMWALLETD_API_PORT}`,
target: `https://127.0.0.1:${JMWALLETD_API_PORT}`,
pathRewrite: { [`^${PUBLIC_URL}`]: '' },
changeOrigin: true,
secure: false,
@ -55,7 +55,7 @@ module.exports = (app) => {
)
app.use(
createProxyMiddleware(`${PUBLIC_URL}/obwatch/`, {
target: `http://localhost:${JMOBWATCH_PORT}`,
target: `http://127.0.0.1:${JMOBWATCH_PORT}`,
pathRewrite: { [`^${PUBLIC_URL}/obwatch/`]: '' },
changeOrigin: true,
secure: false,
@ -70,7 +70,7 @@ module.exports = (app) => {
*/
app.use(
createProxyMiddleware(`${PUBLIC_URL}/jmws`, {
target: `http://localhost:${JAM_API_PORT}`,
target: `http://127.0.0.1:${JAM_API_PORT}`,
pathRewrite: { [`^${PUBLIC_URL}`]: '' },
changeOrigin: true,
secure: false,
@ -79,7 +79,7 @@ module.exports = (app) => {
)
app.use(
createProxyMiddleware(`${PUBLIC_URL}/api/`, {
target: `http://localhost:${JAM_API_PORT}`,
target: `http://127.0.0.1:${JAM_API_PORT}`,
pathRewrite: { [`^${PUBLIC_URL}`]: '' },
changeOrigin: true,
secure: false,
@ -87,7 +87,7 @@ module.exports = (app) => {
)
app.use(
createProxyMiddleware(`${PUBLIC_URL}/obwatch/`, {
target: `http://localhost:${JAM_API_PORT}`,
target: `http://127.0.0.1:${JAM_API_PORT}`,
pathRewrite: { [`^${PUBLIC_URL}`]: '' },
changeOrigin: true,
secure: false,
@ -95,7 +95,7 @@ module.exports = (app) => {
)
app.use(
createProxyMiddleware(`${PUBLIC_URL}/jam/`, {
target: `http://localhost:${JAM_API_PORT}`,
target: `http://127.0.0.1:${JAM_API_PORT}`,
pathRewrite: { [`^${PUBLIC_URL}`]: '' },
changeOrigin: true,
secure: false,