Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

webpack 服务是否可以支持https #250

Open
zoe1874 opened this issue Sep 29, 2020 · 0 comments
Open

webpack 服务是否可以支持https #250

zoe1874 opened this issue Sep 29, 2020 · 0 comments

Comments

@zoe1874
Copy link

zoe1874 commented Sep 29, 2020

  • Node Version: 11.14.0
  • Beidou Version: 最新版本

webpack devServer 服务想支持 https 配置,我在 config 的 devServer 中配置了相应的 https 配置,但是实际在beidou-webpack插件中做转发的时候,写死了http, 导致实际没有符合预期。

是否可以在 beidou-webpack/app/middleware/webpack.js 中支持根据传入的配置生成转发地址,比如:

    const { devServer: { https = false } } = options
    const originUrl = `${https ? 'https://' : 'http://'}${ctx.host}${ctx.request.url}`;
    const url = new URL(originUrl);
    url.set('port', app.webpackServerPort);
    const webpackUrl = url.href;
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant