cli: add CORS headers for webpack-dev-server content

This allows loading static assets from dev-servers
for dynamic plugin containers.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2024-07-17 18:19:32 +01:00
parent be1ee471cf
commit f93ae496ce
+6
View File
@@ -256,6 +256,12 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
client: {
webSocketURL: { hostname: host, port },
},
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, OPTIONS',
'Access-Control-Allow-Headers':
'X-Requested-With, content-type, Authorization',
},
},
compiler,
);