Rick Lam
|
b4e8adfcf9
|
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>
|
2023-11-09 12:32:27 +00:00 |
|