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

Commit

Permalink
Fix CORS host (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
diondirza authored and ctrlplusb committed May 3, 2017
1 parent 19b749c commit 550e809
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/development/hotClientServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ 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 @@ -23,7 +24,7 @@ class HotClientServer {
quiet: true,
noInfo: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Origin': `http://${config('host')}:${config('port')}`,
},
// 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

0 comments on commit 550e809

Please sign in to comment.