mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 18:21:12 +03:00
Fix webpack-dev-server proxy to accommodate auth changes
This commit is contained in:
parent
81c85913ac
commit
e3d42d8e1b
@ -55,26 +55,37 @@ const watch = {
|
|||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
https: true,
|
https: true,
|
||||||
port: 3000,
|
port: 3000,
|
||||||
https: true,
|
|
||||||
clientLogLevel: 'none',
|
clientLogLevel: 'none',
|
||||||
proxy: {
|
proxy: [{
|
||||||
'/': {
|
context: (pathname, req) => !(pathname === '/api/login/' && req.method === 'POST'),
|
||||||
target: TARGET,
|
target: TARGET,
|
||||||
secure: false,
|
secure: false,
|
||||||
ws: false,
|
ws: false,
|
||||||
bypass: req => req.originalUrl.includes('hot-update.json')
|
bypass: req => req.originalUrl.includes('hot-update.json')
|
||||||
},
|
},
|
||||||
'/websocket': {
|
{
|
||||||
|
context: '/api/login/',
|
||||||
|
target: TARGET,
|
||||||
|
secure: false,
|
||||||
|
ws: false,
|
||||||
|
headers: {
|
||||||
|
Host: `localhost:${TARGET_PORT}`,
|
||||||
|
Origin: TARGET,
|
||||||
|
Referer: `${TARGET}/`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
context: '/websocket',
|
||||||
target: TARGET,
|
target: TARGET,
|
||||||
secure: false,
|
secure: false,
|
||||||
ws: true
|
ws: true
|
||||||
},
|
},
|
||||||
'/network_ui': {
|
{
|
||||||
|
context: '/network_ui',
|
||||||
target: TARGET,
|
target: TARGET,
|
||||||
secure: false,
|
secure: false,
|
||||||
ws: true
|
ws: true
|
||||||
}
|
}]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user