Skip to content
This repository has been archived by the owner on Jun 3, 2019. It is now read-only.

Fixed Access-Control-Allow-Origin for HMR #482

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions internal/development/hotClientServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down