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

How to migrate to Requestly? #69

Open
pramaths opened this issue Aug 22, 2024 · 3 comments
Open

How to migrate to Requestly? #69

pramaths opened this issue Aug 22, 2024 · 3 comments

Comments

@pramaths
Copy link

I have some of javascript redirects up in the Resource Override chrome extension. But it is no longer being maintained. So, I am moving on to a different solution called Requestly chrome extension.

I am finding it difficult to do so.

Has anyone here done it before ? Does Requestly allow importing rules from Resource Override?
Please help.

@sachinjain024
Copy link

Hey, @pramaths One of the core maintainers of Requestly here!

Requestly doesn't support importing configuration from Resource Override, I just checked different capabilities that R.O offers

  1. Redirects
  2. Inject Files
  3. Modify Headers

All of these capabilities exist in Requestly through different HTTP Rule Types.

I hope it helps!

@sachinjain024
Copy link

I have created a Github Issue here. Please feel free to contribute directly to the source code or watch the issue.

In the meantime, you can use the following tips to migrate your JS redirects from Resource Override to Requestly.

You need to understand the different operators supported in Requestly. You can find the documentation here - https://docs.requestly.com/general/http-rules/advanced-usage/rule-operators

Case1. Exact Match in Resource Override

Resource Override Config 👇

From - http://www.ex.com/neat.js
To - http://local:8080/cool.js

This becomes a very straightforward setup in Requestly. Use the HTTP Redirect Rule with the "Equals" operator.

Request URL "Equals" http://www.ex.com/neat.js
Destination http://local:8080/cool.js

Case2. Wildcard Match in "Match URL"

Resource Override Config 👇

Match URL - http://www.ex.com/*.js
Replace URL - http://local:8080/*.js

In Requestly, Use the "Wildcard" operator and the substituted value should be replaced with $1,$2, etc.

e.g. In Requestly, You will use HTTP Redirect Rule like

URL "Matches Wildcard" http://www.ex.com/*.js
Destination URL - http://local:8080/$1.js

Case 3. Multiple Wildcard Operators

Resource Override Config 👇

Match URL - http://ex.com/*/**/***.js
Replace URL - http://local:8080/**/*/***.js

In Requestly, This becomes HTTP Redirect Rule with Wildcard Operator like

Request URL "Matches Wildcard" http://ex.com/*/*/*.js
Destination URL http://local:8080/$2/$1/$3.js

I hope this helps you migrate your configuration from Resource Override to Requestly. If you end up building a script for this, feel free to open a PR and contribute to the requestly repo.

PS - Looks like you raised a question on StackOverflow which I just answered - https://superuser.com/questions/1853105/how-to-migrate-to-requestly

@pramaths
Copy link
Author

Sure, let me give it a try. I would have liked direct import but this is also fine

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

No branches or pull requests

2 participants