-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Disable launching browser on Web API template #57682
Conversation
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.
Looks good! 👍
LGTM |
We could remove these lines from the F# template as well for consistency, but that hasn't regressed since it never did have Swagger UI. |
@gfoidl Not quite. I'm suggesting that the default for all templates is set to |
I disagree. Having this enabled by default is important for new users as well as learners. Removing that will cause friction for those users. For the experienced developers, they can configure the setting to Regardless of the default, some users will be dissatisfied, there is no setting here which every user will be happy with. |
Approved via email! |
@wtgodbe Can I get help merging this? |
Description
Earlier in this release cycle, we removed the Swagger UI from the built-in templates and updated the launch URL on the Web API templates to point to the
/weatherforecast
endpoint.Recently, we discovered that this default might be problematic for scenarios where the templates are instantiated with authentication configured. In this case, navigating to
/weatherforecast
on launch will result in 401 errors as the browser is unauthenticated.This sparked conversation about whether it was meaningful to launch URL to this endpoint at all and we decided to remove it in favor of allowing editors/users to configure the launch behavior as desired by their launch configuration.
Resolve https://github.com/dotnet/AspNetCore-ManualTests/issues/3002.
Customer Impact
Prior to this PR, customers that are creating new templates with authentication enabled might see confusing behavior when launching their applications without authentication configured correctly.
Regression?
Risk
This change only impacts the Web API templates in .NET 9 and beyond and doesn't affect the runtime behavior of the application.
Verification
Packaging changes reviewed?