-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Make sure Angular CLI middleware supports "ng serve --ssl" #27799
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
Conversation
…ng to full URL returned by Angular CLI.
} | ||
|
||
private static async Task<AngularCliServerInfo> StartAngularCliServerAsync( | ||
private static async Task<Uri> StartAngularCliServerAsync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AngularCliServerInfo
class seems to be unused now and could be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix isn't working as reproduced with the code of this PR in following repo:
Thanks for taking the time to put together this PR, @gunsh! It seems like this PR now requires that the Angular development server be started with SSL enabled? Also, I notice this change (angular/angular-cli#19412) has been merged into the Angular CLI. Does the issue still repro with this change? |
@captainsafia possibly that may fix the issue, but will have to wait until next angular cli release. I wanted to raise this issue on angular repo first, but when I tried angular cli 11 project on its own it worked fine. Making angular cli started in ssl just for this error to go away is not ideal. This issue only occurs when using angular 11 with .net 5. Therefore, my thinking is still that .net spa middleware has some fix in it. |
Got it. This change seems functionally fine. Can you share the scenarios it was validated against? For example, does it work with versions of Angular other than Angular 11. |
From the referenced issue, it looks like updating the CLI version resolves the issue with SSL connections so I don't think we should backport this to 5.0. But this change (reading the URL of the app from the output) is worthwhile enough to include in 6.0, IMO. |
This fixes inability of middleware to listen on "ng serve --ssl" which solves #27790
Addresses #27790