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

Check targetUrlResolved against PRIVATE_BY_POLICY_DOMAINS #3405

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

rebeccacremona
Copy link
Contributor

In #3392, we implemented a new policy for when to make Perma Links private: we maintain a list of domains to check against.

At the time, when capturing with Scoop, it was only possible for Perma to check the target URL.

As of Scoop 0.5.5, added to the Scoop API recently, we can now also see the URL that the browser "lands on", after any redirects, and check that too.

This PR does so.

See ENG-352.


Note: I spent a lot of time yesterday trying to add a test for this, experimenting with 3 approaches, none of which worked in all circumstances, and all of which were intricate. For a feature of this importance.... I think it is more appropriate to leave it untested. I'm happy to say more, if people are curious.

@rebeccacremona rebeccacremona requested a review from a team as a code owner October 11, 2023 14:25
@rebeccacremona rebeccacremona requested review from bensteinberg and removed request for a team October 11, 2023 14:25
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

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

Comparison is base (42fbdd7) 68.57% compared to head (fa938e9) 68.65%.
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3405      +/-   ##
===========================================
+ Coverage    68.57%   68.65%   +0.08%     
===========================================
  Files           53       53              
  Lines         7229     7233       +4     
===========================================
+ Hits          4957     4966       +9     
+ Misses        2272     2267       -5     
Files Coverage Δ
perma_web/api/urls.py 80.95% <100.00%> (+0.95%) ⬆️
perma_web/perma/celery_tasks.py 47.82% <0.00%> (+0.46%) ⬆️

... and 1 file with indirect coverage changes

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

@rebeccacremona rebeccacremona merged commit da0f003 into harvard-lil:develop Oct 11, 2023
2 checks passed
@rebeccacremona rebeccacremona deleted the check-resolved-url branch October 30, 2023 18:42
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