Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Add option to create HTTPS development server #195

Closed
skyrpex opened this issue Jun 20, 2017 · 7 comments · Fixed by #198
Closed

Add option to create HTTPS development server #195

skyrpex opened this issue Jun 20, 2017 · 7 comments · Fixed by #198

Comments

@skyrpex
Copy link
Contributor

skyrpex commented Jun 20, 2017

Do you want to request a feature or report a bug?
Request a feature.

What is the current behavior?
There's no support for secure dev servers (HTTPS).

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
To be able to use an HTTPS server.

If this is a feature request, what is motivation or use case for changing the behavior?
I'm currently using a secure localhost server to develop features, because my development assets need to load on a HTTPS page.

Please mention other relevant information such as the browser version, Node.js version, Poi version and Operating System.
I can make a PR. There's code for self-signed certificates in webpack-dev-server, so it would be basically copy&paste.

@egoist
Copy link
Owner

egoist commented Jun 20, 2017

nice, PR is welcome, maybe an https option?

@skyrpex
Copy link
Contributor Author

skyrpex commented Jun 20, 2017

Sure, I'll go for it.

@egoist
Copy link
Owner

egoist commented Jun 20, 2017

because my development assets need to load on a HTTPS page.

Oh, I didn't get this, why it has to be https?

@skyrpex
Copy link
Contributor Author

skyrpex commented Jun 20, 2017

I'm working on a Salesforce managed application. In order to develop with HMR, I have to inject my bundle scripts (aka http://localhost:4000/app.js) into a Salesforce page which is under HTTPS.

I have to work that way because my assets rely on some global JS objects and methods that are present on those Salesforce pages.

@quimarche
Copy link

Please, can you explain how this is used?

(I want to constrain all requests to use HTTPS so I can add a CSP tag:

@egoist
Copy link
Owner

egoist commented Jun 23, 2017

@quimarche it's released on the next channel: yarn add poi@next --dev, its usage is the same as the official webpack cli since they both use webpack-dev-server: https://webpack.js.org/configuration/dev-server/#devserver-https

While in Poi there're two ways to set devServer:

  1. set it in webpack config
  2. set it in poi config:
module.exports = {
  devServer: {}
}

@egoist
Copy link
Owner

egoist commented Jul 4, 2017

It's available in 9.1.0: https://poi.js.org/#/home?id=dev-server

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants