Skip to content

Add CorsPolicyBuilder to WebApp/WebHost extensions#1256

Merged
TimHess merged 2 commits into
SteeltoeOSS:release/3.2from
cieciurm:feature/add-all-actuators-cors-policy
Jan 30, 2024
Merged

Add CorsPolicyBuilder to WebApp/WebHost extensions#1256
TimHess merged 2 commits into
SteeltoeOSS:release/3.2from
cieciurm:feature/add-all-actuators-cors-policy

Conversation

@cieciurm
Copy link
Copy Markdown
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
Copy Markdown
Member

TimHess commented Jan 29, 2024

/azp run Steeltoe.All

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
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
@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.

2 participants