Draft
Conversation
- Add Edge runtime proxy route at /proxy?url=<target> - Inject React Grab script into proxied HTML pages - Rewrite all relative URLs (href, src, srcset, CSS url()) to go through proxy - Add domain blocklist for adult/gambling/malware/piracy sites - Handle CSS @import and url() rewriting - Add security headers in vercel.json Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@react-grab/cli
grab
@react-grab/ami
@react-grab/amp
@react-grab/claude-code
@react-grab/codex
@react-grab/cursor
@react-grab/droid
@react-grab/gemini
@react-grab/opencode
react-grab
@react-grab/relay
@react-grab/utils
commit: |
Simplifies the proxy implementation significantly: - Injects <base href='original-domain'> to resolve all relative URLs - Removes complex URL rewriting logic that broke with dynamic imports - Works correctly with Next.js and other SPAs that use code splitting - Only proxies HTML pages now (returns error for direct asset requests) This approach lets all scripts/styles/images load directly from the original domain while still injecting React Grab into the HTML. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
/proxyroute to enable proxying of external websites, injecting the React Grab script, and rewriting all assets through the proxy for enhanced functionality and security.Summary by cubic
Added an edge /proxy endpoint to load external sites and inject the React Grab script. It now uses a tag and only proxies HTML for better compatibility.
Written for commit d87f3bd. Summary will update on new commits.