From 2fdbe685dadd2d0ea499b386c68a71fcfa342c30 Mon Sep 17 00:00:00 2001 From: Dario Banfi Date: Tue, 8 Aug 2017 16:38:04 +0200 Subject: [PATCH] Fixed Access-Control-Allow-Origin for HMR --- internal/development/hotClientServer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/development/hotClientServer.js b/internal/development/hotClientServer.js index e7d7eff3..9c806a1d 100644 --- a/internal/development/hotClientServer.js +++ b/internal/development/hotClientServer.js @@ -2,7 +2,6 @@ import express from 'express'; import createWebpackMiddleware from 'webpack-dev-middleware'; import createWebpackHotMiddleware from 'webpack-hot-middleware'; import ListenerManager from './listenerManager'; -import config from '../../config'; import { log } from '../utils'; class HotClientServer { @@ -24,7 +23,7 @@ class HotClientServer { quiet: true, noInfo: true, headers: { - 'Access-Control-Allow-Origin': `http://${config('host')}:${config('port')}`, + 'Access-Control-Allow-Origin': '*', }, // Ensure that the public path is taken from the compiler webpack config // as it will have been created as an absolute path to avoid conflicts