fix(admin-ui): Admin UI: Invalid Request Header (#5548)
**What** Fix of https://github.com/medusajs/medusa/issues/4904 **Fixes** Admin run development server with hostname shown Invalid Request Header **How** Added webpack-dev-server config [allowedHosts](https://webpack.js.org/configuration/dev-server/#devserverallowedhosts) and [webSocketUrl](https://webpack.js.org/configuration/dev-server/#websocketurl) in admin develop options to change allowlist services hostname and Web Socket Url **Testing** Edit medusa-config.js with hostname in admin plugin develop options ``` const plugins = [ // ... { resolve: "@medusajs/admin", /** @type {import('@medusajs/admin').PluginOptions} */ options: { develop: { allowedHosts: [ 'host.com', 'subdomain.host.com', 'subdomain2.host.com', 'host2.com', ], webSocketURL: 'wss://host.com/ws' }, }, }, ] ``` Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
@@ -48,6 +48,7 @@ const getDevServerConfig = () => {
|
||||
onListening: function () {
|
||||
openBrowser(`http://localhost:7001`)
|
||||
},
|
||||
allowedHosts: 'auto',
|
||||
} as Configuration,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user