-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid Host header #3392
Comments
Hey @Kreyren , You probably need to set https://webpack.js.org/configuration/dev-server/#devserverdisablehostcheck . We're all working on |
Will close this for now, as there's no actionable item here. If you need further assistance in setting up your development environment, you can find us on Spectrum. |
For those using Webpack 5, use Example:
|
Situation After seeing this solution, I tried it but creating a new file I changed the file name to EXPLANATION By default, Vue CLI looks for a file named vue.config.js in the root of the project directory to configure its build process. By renaming the file to vue.config.js, we are ensuring that Vue CLI will use the correct configuration file and that there are no conflicts with the build process. My code: module.exports = {
// disable the host check on sandbox
devServer: {
disableHostCheck: true
}
}; |
Great, solved my problem, but I still don't understand what this cloud is for |
it didn't work for me... I also use codesandbox |
same with me |
After tried those solutions and none worked for me, I found this: In webpack 5 is changed, please check:
|
I will make sure to also create a documentation page about this, as it's a problem that happens more frequently.
|
solves Issue merkle-open#94 (The examples no longer work in CodeSandbox environments.) We need to add the allowedhosts-flag to devServer-settings for webpack.config: devServer-config to solve "Invalid Host header Issue" on CodeSandBox: codesandbox/codesandbox-client#3392 and https://stackoverflow.com/a/43647767 and https://codesandbox.io/docs/learn/repositories/task#configuring-task-ports https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md#firewall https://webpack.js.org/configuration/dev-server/#devserverallowedhosts firewall: false, // failed while testing disableHostCheck: true, // failed while testing allowedHosts: This flag finally solved it
solves Issue merkle-open#94 (The examples no longer work in CodeSandbox environments.) We need to add the allowedhosts-flag to devServer-settings for webpack.config: devServer-config to solve "Invalid Host header Issue" on CodeSandBox: codesandbox/codesandbox-client#3392 and https://stackoverflow.com/a/43647767 and https://codesandbox.io/docs/learn/repositories/task#configuring-task-ports https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md#firewall https://webpack.js.org/configuration/dev-server/#devserverallowedhosts firewall: false, // failed while testing disableHostCheck: true, // failed while testing allowedHosts: This flag finally solved it
does not work after I use the new AI feature |
What does that have to do anyway, CodeSandBox is an online service, we shouldn't need to be setting things up anyway... When I log on CodeSandBox.io and generate a devbox I expect it to work out of the box, not to start erroring with these kind of things. Is it that hard to just fix the God damn thing??! |
馃悰 bug report
Description of the problem
I seem to have same/similar issue to #2233 on commit 7753555
Diagnosed the issue to be triggered on
Which is located in
node_modules/webpack-dev-server/lib/utils/Server.js
afteryarn && yarn build
suspecting change in dependency that broke the runtimeHow has this issue affected you? What are you trying to accomplish?
Affects testing of a new contribution
Link to sandbox: link (optional)
Codesandbox doesn't support changes in codesandbox (https://codesandbox.io/s/github/codesandbox/codesandbox-client).
Configured gitpod on https://github.com/Kreyren/codesandbox-client/tree/84e0aece9aa6abc8bf5bf5f81493cc6bbd0f34a3 (takes around 5 min to set up since the build is not yet cached due to pebcak(?) gitpod-io/gitpod#1138)
Your Environment
LinuxAnubis 9999 x86_64 (Bedrock-inspired franken-kernel system from scratch with experimental Zernif package manager) - Same issue on Debian Linux using different deviceThe text was updated successfully, but these errors were encountered: