0

I'm working with Vue JS using the webpack template, and dev mode.

How can I have part of my server using the HTTPS protocol and other part using HTTP?

I know that to use HTTPS is just add "https: true" to the devServer variable of the file build/webpack.dev.conf.js . Example:

devServer: {
    https: true,
    // other variables...
}

But when I do that just the HTTPS requests are accepted, no HTTP anymore.

How can I work with both protocols? If it's not possible, is there a VueJS way to redirect an HTTP request to an HTTPS?

Lawrence Cherone
  • 46,049
  • 7
  • 62
  • 106
Derzu
  • 7,011
  • 3
  • 57
  • 60

1 Answers1

0

It doesn't look totally straightforward to configure multiple entry points on your webpack server. Your best bet is likely to reverse-proxy the http requests using whatever other webserver you have handy. IIS will do this for you, for example. Google "reverse proxy [name-of-your-webserver]" :-)

bbsimonbb
  • 27,056
  • 15
  • 80
  • 110