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

Add CorsPolicyBuilder to WebApp/WebHost extensions #1256

Merged

Conversation

cieciurm
Copy link
Contributor

Description

Hi all,

This PR addresses issue #1251 by adding optional parameter Action<CorsPolicyBuilder> to two extension methods:

  • ManagementWebHostBuilderExtensions => AddAllActuators
  • ManagementWebApplicationBuilderExtensions => AddAllActuators

Fixes #1251

I'd like to ask for guidance and suggestion about testing this change.
I can see that there aren't many unit tests for those extension methods in general.

My only idea would be to inspect IServiceCollection whether the underlying call to ActuatorServiceCollectionExtensions => AddSteeltoeCors was made.
Kindly please advise if such implementation would be good.

Thanks in advance!

Quality checklist

  • Your code complies with our Coding Style.
  • You've updated unit and/or integration tests for your change, where applicable.
  • You've updated documentation for your change, where applicable.
    If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
  • You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

@TimHess TimHess added Type/enhancement New feature or request Component/Management Issues related to Steeltoe Management (actuators) ReleaseLine/3.x Identified as a feature/fix for the 3.x release line labels Jan 29, 2024
@TimHess TimHess added this to the 3.2.7 milestone Jan 29, 2024
@TimHess
Copy link
Member

TimHess commented Jan 29, 2024

/azp run Steeltoe.All

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

sonarcloud bot commented Jan 29, 2024

Copy link
Member

@TimHess TimHess left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@TimHess TimHess merged commit 027ea66 into SteeltoeOSS:release/3.2 Jan 30, 2024
21 checks passed
@cieciurm cieciurm deleted the feature/add-all-actuators-cors-policy branch January 30, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component/Management Issues related to Steeltoe Management (actuators) ReleaseLine/3.x Identified as a feature/fix for the 3.x release line Type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants