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

Remove forced redirects support #7

Merged
merged 4 commits into from
Aug 12, 2022
Merged

Remove forced redirects support #7

merged 4 commits into from
Aug 12, 2022

Conversation

justindotpub
Copy link
Collaborator

  • Remove forced redirects support
  • Return a human-readable error is someone attempts to use forced redirects

- Return a human-readable error is someone attempts to use forced redirects
@justindotpub
Copy link
Collaborator Author

Closes #4

@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2022

Codecov Report

Merging #7 (5beba0e) into main (8b4073e) will increase coverage by 4.83%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
+ Coverage   75.86%   80.70%   +4.83%     
==========================================
  Files           1        1              
  Lines          58       57       -1     
==========================================
+ Hits           44       46       +2     
+ Misses          9        7       -2     
+ Partials        5        4       -1     
Impacted Files Coverage Δ
redirects.go 80.70% <71.42%> (+4.83%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

force = true
s = strings.Replace(s, "!", "", -1)
// See https://docs.netlify.com/routing/redirects/rewrites-proxies/#shadowing
return -1, fmt.Errorf("forced redirects (or \"shadowing\") are not supported by IPFS gateways")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I avoided "aka" and thought "also known as" might be long for an error message. Including links seems bad and prone to needing updating. I think I personally would prefer just "forced redirects" but if "shadowing" helps people, great. 👍

@justindotpub
Copy link
Collaborator Author

In the interest of having everything ready for you to approve and merge, I'm going to go ahead and merge this so that I can get my latest changes in kubo pointing at this code. But let me know if you want anything changed here.

@justindotpub justindotpub merged commit 37f4710 into main Aug 12, 2022
@justindotpub justindotpub deleted the jj-remove-force branch August 12, 2022 18:45
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

lgtm, thank you!

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.

3 participants