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

proxy mode: replay improvements for content not captured via proxy mode #520

Merged
merged 2 commits into from
Nov 12, 2019

Conversation

ikreymer
Copy link
Member

Description

Better replay of content captured in rewriting/native mode, but replayed in proxy mode (eg. WR desktop/player)

Ensure preflight OPTIONS request is handled correctly and CORS headers added.

Motivation and Context

When capturing in native/rewriting mode, CORS headers and OPTIONS are not sent and never captured. However, when replaying in proxy mode, browser expects CORS headers to be there.
This ensures that CORS headers are added in proxy mode.

Screenshots (if appropriate):

Types of changes

  • Replay fix (fixes a replay specific issue)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added or updated tests to cover my changes.
  • All new and existing tests passed.

- if preflight OPTIONS request, respond directly (don't attempt OPTIONS capture lookup)
- if preflight CORS request, ensure response has appropriate CORS headers, even if not captured
- wombat: update to latest wombat with updated Date() fixed timezone in proxy mode
@ikreymer ikreymer requested a review from m4rk3r November 12, 2019 20:11
@codecov
Copy link

codecov bot commented Nov 12, 2019

Codecov Report

Merging #520 into develop will decrease coverage by 0.15%.
The diff coverage is 43.75%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #520      +/-   ##
===========================================
- Coverage    88.09%   87.93%   -0.16%     
===========================================
  Files           64       64              
  Lines         7922     7934      +12     
  Branches      1420     1425       +5     
===========================================
- Hits          6979     6977       -2     
- Misses         607      615       +8     
- Partials       336      342       +6
Impacted Files Coverage Δ
pywb/apps/rewriterapp.py 87.63% <33.33%> (-1.46%) ⬇️
pywb/apps/wbrequestresponse.py 91.02% <75%> (ø) ⬆️
pywb/apps/static_handler.py 85.71% <0%> (-2.39%) ⬇️
pywb/warcserver/index/aggregator.py 90.62% <0%> (-1.18%) ⬇️
pywb/recorder/multifilewarcwriter.py 77.96% <0%> (-1.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d819aa...b3c145b. Read the comment docs.

@ikreymer ikreymer merged commit 3068080 into develop Nov 12, 2019
@ikreymer ikreymer deleted the proxy-cors-fix branch January 18, 2020 01:06
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