Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: optimize the judgment on whether HTTPS has been set in options #7202

Merged
merged 2 commits into from Jul 4, 2022

Conversation

backrunner
Copy link
Contributor

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

Webpack also provides two configuration items named http2 and devServer.server, if http2 is set to true, the dev server will also start with HTTPS, and it's the same for devServer.server is set to https or spdy.

The current code only judgement whether projectDevServerOptions.https is a truthy value, this is an inaccurate judgement.

This patch contains changes that cover more cases than the existing code, allowing users to get correct URLs after executing vue-cli-service serve.

Copy link
Member

@sodatea sodatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sodatea sodatea merged commit bddd64d into vuejs:dev Jul 4, 2022
@backrunner
Copy link
Contributor Author

@sodatea Your commit 558dea2 suddenly reminded me that my fix is not perfect. devServer.server.type is not included in the judgement, I'll create another patch to cover that case.
If you have time now, you can complete this judgement first. Sorry for this fix isn't perfect.

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

Successfully merging this pull request may close these issues.

None yet

2 participants