saguijs / sagui

:monkey: Front-end tooling in a single dependency
http://sagui.js.org/
MIT License
669 stars 32 forks source link

Allowing dev server access from iOS devices #398

Closed danevron closed 6 years ago

danevron commented 6 years ago

Currently going to a machine IP instead of localhost results in "Invalid Host header" message on the page. As a result we are unable to view pages on iOS devices.

I've tried extending Webpack config with the following which should help according to Webpack but without success.

    devServer: {
      host: '0.0.0.0',
      disableHostCheck: true
    },

I suspect an older Webpack version is used but not sure.

xaviervia commented 6 years ago

Hi! Thanks for reaching out. This is a known issue due to a change in the default configuration in Webpack, but it hasn't yet been explicitly documented how to fix this in Sagui. I opened a PR for that:

https://github.com/saguijs/sagui/pull/400

The configuration that needs to be set is:

develop: { 
  disableHostCheck: true
}
xaviervia commented 6 years ago

For reference, what version of Sagui are you using?

pirelenito commented 6 years ago

@danevron did the documented solution at https://github.com/saguijs/sagui#invalid-host-header---accessing-dev-server-from-outside-localhost worked?

danevron commented 6 years ago

@pirelenito - Yes it did! @xaviervia, @pirelenito - Thank you both for the swift (and helpful) reply.