The Redirect Rule
in Requestly allows you to redirect requests to a new version of Prebid.js instead of the live version. This is particularly useful for testing updates and validating configurations in production, without disrupting ongoing ad operations.
Load new version of Prebid.js to test on production
Kanishk Rawat
September 6, 2024
2MIN READ
Test the new version of Prebid.js in production safely with Requestly’s redirect rule. Ensure accurate results without disrupting live ad operations.
Introduction
Testing new versions of Prebid.js in a production environment can be risky, potentially disrupting live ad operations and affecting ongoing campaigns. The difficulty lies in validating the new version without impacting the current setup.
Requestly offers a solution by enabling you to test new Prebid.js versions safely by redirecting requests, ensuring minimal disruption and accurate validation.
Load new version of Prebid.js
- Another URL: You can redirect the request to a different URL. In this case, the redirection is happening to a new JavaScript file URL.
- Local File: This option lets you redirect to a local file stored on your machine.
- From Files/Mock server: You can also choose to redirect the request to a file hosted on a mock server or from files you’ve set up.
- Source Condition: This determines which requests will be redirected. Here, any request containing
https://example.com/prebid.js
will be redirected. - Destination URL: This is the URL where the request is redirected. In the example, it’s redirecting to a new debug script.
- Test URL Condition: You can check if the rules you’ve set up work correctly by testing them on specific URLs.
- Filter Out Condition: You can apply
filters
to limit which requests are affected, making sure only the ones you want are modified.
Or create your own Rule
by following the steps below
Here’s how to set up a redirect rule to load a new version of Prebid.js for testing in production:
- Open Requestly: Launch the Requestly app.
- Create a New Rule: Click on
New Rule
and selectRedirect Rule.
- Enter the Current Prebid.js URL Pattern: Add the URL pattern for the existing Prebid.js version you want to replace.
- Specify the New Prebid.js URL: Enter the URL of the new Prebid.js version. This will be the target of the redirect.
- Example Current URL:
https://example.com/prebid.js
- Example New URL:
https://example.com/new-prebid.js
- Example Current URL:
- Save the Rule: Click “Save” to create the rule and ensure it is activated by toggling the switch to the “On” position.
Interactive Guide
Check this interactive and easy explanation of how to create Redirect rule.
Conclusion
Try this redirect rule to test the new Prebid.js version in production, ensuring accurate results without disrupting live ad operations. Requestly is trusted by over 200k developers and 1000+ corporates for its effectiveness in managing network requests.
Explore More:
Written by
Kanishk Rawat
Kanishk Rawat, a tech enthusiast since childhood, has mastered programming through dedication. Whether solo or in a team, he thrives on challenges, crafting innovative solutions .
Contents
Subscribe for latest updates
Share this article
Related posts
Our journey to finding Product-Market Fit
Sachin Jain
December 5, 2024
How Blockthrough uses Requestly to seamlessly test their JS on publisher websites
Sagar Soni
December 4, 2024
The Best Open Source API Mocking Tool for developers (With examples)
Anmol Baranwal
December 2, 2024