Skip to content

Commit 83c0d54

Browse files
committed
Allow *.httptoolkit.tech CORS request from servers on any port
This is mainly useful for local development - you can run a local server on 8080 behind a subdomain that resolves locally for services that require non-localhost domains (i.e. auth0)
1 parent ede4c32 commit 83c0d54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/httptoolkit-server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ export class HttpToolkitServer extends events.EventEmitter {
160160
port: { port: 45457, host: 'localhost' },
161161
playground: false,
162162
cors: {
163-
origin: [/https?:\/\/localhost(:\d+)?$/, /\.httptoolkit\.tech$/]
163+
origin: [
164+
/https?:\/\/localhost(:\d+)?$/,
165+
/\.httptoolkit\.tech(:\d+)?$/
166+
]
164167
}
165168
});
166169
}

0 commit comments

Comments
 (0)