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(gitlab): workaround hotlinking protection (406 Not Acceptable) #123

Merged

Conversation

andreymart-test
Copy link
Contributor

problem:
#97

reason:
This returns an Error 406, Im guessing due to the hotlinking rules
https://gitlab.com/gitlab-org/gitlab/-/commit/50c11f278d18fe1f3fb12eb595067216bb58ade2

solved:
need to add a mode mode: 'same-origin' in fetch that solves the problem.

@pi0 pi0 force-pushed the fix/gitlab-not-acceptable-download-archive branch from 7b9fa38 to c3e93eb Compare December 23, 2023 20:54
Copy link

codecov bot commented Dec 23, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (1945818) 55.07% compared to head (81e327f) 54.93%.

Files Patch % Lines
src/_utils.ts 60.00% 2 Missing ⚠️
src/providers.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
- Coverage   55.07%   54.93%   -0.15%     
==========================================
  Files           7        7              
  Lines         601      608       +7     
  Branches       46       47       +1     
==========================================
+ Hits          331      334       +3     
- Misses        269      273       +4     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pi0 pi0 changed the title fix: GitLab - 406 Not Acceptable download archive error fix(gitlab): workaround hotlinking protection (406 Not Acceptable) Dec 23, 2023
@pi0
Copy link
Member

pi0 commented Dec 23, 2023

Thanks for working on this dear @andreymart-test ❤️

I have made slight changes to only set mode and header for gitlab provider as it seems adding mode breaks other providers like github.

@pi0 pi0 merged commit 3e58ae6 into unjs:main Dec 23, 2023
2 of 4 checks passed
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.

None yet

2 participants