Hello, I’m trying to run a project using compose w...
# compose-web
p
Hello, I’m trying to run a project using compose web but after running the project I’m getting
Invalid Host header
error in browser. Can someone please help?
1
b
Which url are you using to access the app?
p
@Big Chungus It is running in localhost:80. I made an entry in /etc/hosts file as
127.0.0.1   name.company.local
and upon trying to open it via name.company.local, it’s throwing the above error. Is my approach correct?
b
Right, the problem then is not k/js nor compose. Why can't you use localhost:8080 or whatever the default webpack dev-server port is?
p
There’s a limitation in an api I’m consuming where it only allows requests coming from “.local” and not localhost. I tried using hotel as well, but it wasn’t working
b
Try this via
webpack.config.d
https://stackoverflow.com/a/31252683/10938638