mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +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',
|
||||
https: true,
|
||||
port: 3000,
|
||||
https: true,
|
||||
clientLogLevel: 'none',
|
||||
proxy: {
|
||||
'/': {
|
||||
proxy: [{
|
||||
context: (pathname, req) => !(pathname === '/api/login/' && req.method === 'POST'),
|
||||
target: TARGET,
|
||||
secure: false,
|
||||
ws: false,
|
||||
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,
|
||||
secure: false,
|
||||
ws: true
|
||||
},
|
||||
'/network_ui': {
|
||||
{
|
||||
context: '/network_ui',
|
||||
target: TARGET,
|
||||
secure: false,
|
||||
ws: true
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user