We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abbed64 commit fd1d5f0Copy full SHA for fd1d5f0
preview/preview.js
@@ -188,12 +188,8 @@ const checkRedirects = async (core, path) => {
188
189
module.exports = Core => {
190
const server = http.createServer((request, response) => {
191
- let host = process.env.HOST;
192
- if (host == null || host === "") {
193
- host = "localhost";
194
- }
195
-
196
- const parsedUrl = new URL(`http://${host}${request.url}`);
+ //hardcode to 'localhost' only pathname is checked on parsedUrl
+ const parsedUrl = new URL(`http://localhost${request.url}`);
197
const prefix = hostPrefix(request.headers['host']);
198
const core = Core(prefix);
199
requestHandler(core, parsedUrl, response)
0 commit comments