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

fix(gateway): include CORS on subdomain redirects #395

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

lidel
Copy link
Member

@lidel lidel commented Jun 26, 2023

This PR closes regression introduced during one of the refactors since Kubo 0.20 and adds dedicated tests for preflight requests on both path and subdomain gateway.

Context: ipfs/kubo#9983 (comment)

@lidel lidel force-pushed the fix/http-options-on-subdomains branch from 47e4306 to 4735062 Compare June 26, 2023 22:21
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #395 (072f6be) into main (72238ea) will increase coverage by 0.12%.
The diff coverage is 88.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #395      +/-   ##
==========================================
+ Coverage   51.37%   51.49%   +0.12%     
==========================================
  Files         280      280              
  Lines       33443    33456      +13     
==========================================
+ Hits        17181    17229      +48     
+ Misses      14531    14491      -40     
- Partials     1731     1736       +5     
Impacted Files Coverage Δ
gateway/hostname.go 73.79% <77.77%> (+6.13%) ⬆️
gateway/handler.go 77.70% <90.90%> (+1.86%) ⬆️
gateway/gateway.go 92.55% <100.00%> (+0.33%) ⬆️

... and 10 files with indirect coverage changes

@lidel lidel changed the title fix(gateway): include on subdomain redirects fix(gateway): include CORS on subdomain redirects Jun 26, 2023
lidel added a commit to ipfs/kubo that referenced this pull request Jun 26, 2023
@lidel lidel requested a review from laurentsenta June 26, 2023 22:48
lidel added a commit to ipfs/kubo that referenced this pull request Jun 26, 2023
lidel added a commit to ipfs/kubo that referenced this pull request Jun 26, 2023
@lidel lidel marked this pull request as ready for review June 26, 2023 23:15
@lidel lidel requested a review from hacdias as a code owner June 26, 2023 23:15
gateway/gateway.go Show resolved Hide resolved
gateway/gateway_test.go Outdated Show resolved Hide resolved
gateway/gateway.go Show resolved Hide resolved
@hacdias hacdias force-pushed the fix/http-options-on-subdomains branch from 4735062 to 072f6be Compare June 27, 2023 10:38
Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

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

LGTM, I rebased it. Will merge once CI is green.

@hacdias hacdias merged commit a87f9ed into main Jun 27, 2023
15 checks passed
@hacdias hacdias deleted the fix/http-options-on-subdomains branch June 27, 2023 10:50
hacdias pushed a commit to ipfs/kubo that referenced this pull request Jun 27, 2023
@hacdias hacdias mentioned this pull request Jun 27, 2023
@lidel lidel mentioned this pull request Jun 29, 2023
hacdias pushed a commit that referenced this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants