-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4.0.0-beta.0 and host option #2874
Comments
devServer: {
host: 'some.site.loc',
} Nothing changed for
|
Okay, thanks Full config: devServer: {
host: 'some.site.loc',
https: {
key: fs.readFileSync(path.join('docker', 'ssl', 'some.site.loc-key.pem')),
cert: fs.readFileSync(path.join('docker', 'ssl', 'some.site.loc.pem')),
ca: fs.readFileSync(path.join('docker', 'ssl', 'rootCA.pem')),
},
port: 9090,
static: path.resolve(appDir, 'public'),
open: true,
historyApiFallback: {
rewrites: [
{
from: /./,
to: '/build/index.html'
},
],
},
proxy: {
'/api': `http://${hostLocal}`,
},
}, Console output:
browser open:
https://some.site.loc:9090/ also works. The only problem is false output to the console and the opened address in the browser. |
Yep, bug, try to fix it in near future |
@alexander-akait from config:
Console output:
browser open:
But I would like to get https://some.site.loc:9090/ in browser on startup. This address also works, but I need to open it manually. |
|
um yeah from my
|
You can use |
thanks, I didn't know about this option with I used |
Question
How should I replace the
host
option in the new version?Perhaps I did not understand this from the changelog.
webpack-dev-server v3:
with webpack-dev-server v4 I try:
Result from console:
When I try open
https://some.site.loc:9090
I get responseInvalid Host header
.If I do not change the option (I leave it as it was in the previous version), then by default
https://127.0.0.1:9090
will still open, buthttps:/some.site.loc:9090
also works. In this case, I would like the console to write the correct address and the correct address to open in the browser.The text was updated successfully, but these errors were encountered: