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

[Backport 2.x] Omit adding the osd-version header when the Fetch request is to an external origin #3867

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 0762566 from #3643.

…external origin (#3643)

* Making `fetch` requests using core/public/http/fetch, an `osd-version` header is forcefully added, even to external requests. This change examines the destination and only adds the header to relative URLs and those that are to OSD itself.
* This change also adds `osd-xsrf` to calls that use `osd-version` incorrectly to satisfy XSRF protection

Fixes #3277

Signed-off-by: Miki <miki@amazon.com>
(cherry picked from commit 0762566)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
@opensearch-trigger-bot opensearch-trigger-bot bot requested a review from a team as a code owner April 17, 2023 22:26
Signed-off-by: Josh Romero <rmerqg@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 17, 2023

Codecov Report

Merging #3867 (db41554) into 2.x (9eb8eb9) will decrease coverage by 0.06%.
The diff coverage is 71.42%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##              2.x    #3867      +/-   ##
==========================================
- Coverage   66.45%   66.40%   -0.06%     
==========================================
  Files        3208     3208              
  Lines       61721    61727       +6     
  Branches     9535     9536       +1     
==========================================
- Hits        41016    40988      -28     
- Misses      18417    18446      +29     
- Partials     2288     2293       +5     
Flag Coverage Δ
Linux 66.40% <71.42%> (+<0.01%) ⬆️
Windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ashboards_legacy/public/angular/angular_config.tsx 39.28% <50.00%> (+0.19%) ⬆️
src/core/public/http/fetch.ts 96.05% <75.00%> (-1.17%) ⬇️
src/core/server/http/lifecycle_handlers.ts 100.00% <100.00%> (ø)

... and 10 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@joshuarrrr
Copy link
Member

whitesource check can be ignored.

@ashwin-pc ashwin-pc merged commit 7ab8dcc into 2.x Apr 18, 2023
@github-actions github-actions bot deleted the backport/backport-3643-to-2.x branch April 18, 2023 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants