Prepend a path to pages

Hi!

So here is my issue. I have a domain managed by Cloudflare example.com. I’ve set up a Worker on Cloudflare so I can handle requests and respond dynamically before they even reach the server. The idea is that I have a section on my website called “resources” → example.com/resources which if the user navigates to it, the script parses the pathname, and if it begins by /resource/* the request will be forwarded to a webflow blog (the custom domain hosted by webflow: resources.example.com) similar to what this guy is doing in this blog post: How to use Webflow to host parts of your site (Cloudflare Workers) | by Liran Cohen | Medium

Now the problem is once the request is forwarded and I end up on the webflow blog site (where the URL is: example.com/resources), all links on the webflow website home page have a relative path:

<a href="/categories/some-category" class="nav-link w-nav-link" style="max-width: 1270px;">Example category</a>

The problem here is that i’d like it to be /resources/categories or /resources/*. How do I change the relative path to all links on webflow site to have resource/ prepended to them?

Thank you so much!

ANSWER: