File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
codesandbox-api/src/dispatcher Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { getModulePath } from 'common/sandbox/modules';
77import { generateFileFromSandbox } from 'common/templates/configuration/package-json' ;
88
99import setupHistoryListeners from './url-listeners' ;
10- import compile , { getCurrentManager } from './compile' ;
10+ import compile from './compile' ;
1111import setupConsole from './console' ;
1212import transformJSON from './console/transform-json' ;
1313
Original file line number Diff line number Diff line change @@ -68,10 +68,13 @@ function notifyFrames(message: Object) {
6868function eventListener ( e : MessageEvent ) {
6969 const { data } = e ;
7070
71+ const testedHost = host || 'https://codesandbox.io' ;
72+ const origin = testedHost . replace ( 'https://' , '' ) . replace ( 'http://' , '' ) ;
73+
7174 if (
7275 data . codesandbox &&
73- ( e . origin . endsWith ( '.codesandbox.io' ) ||
74- e . origin . endsWith ( '/codesandbox.io' ) ||
76+ ( e . origin . endsWith ( `. ${ origin } ` ) ||
77+ e . origin . endsWith ( `/ ${ origin } ` ) ||
7578 process . env . NODE_ENV !== 'production' )
7679 ) {
7780 notifyListeners ( data , e . source ) ;
You can’t perform that action at this time.
0 commit comments