2

We are trying to implement "Partytown" to serve third-party scripts through webworker service where for metarouter the Script URL needs to come from CDN to which Sitecore has access but the frontend system is not having access. thus we are creating a proxy, frontend will give Sitecore a URL to access, and Sitecore should access that URL and return whatever it is there (the get request)

If I try to do a hit on the service from Sitecore I get the result while hitting it through the frontend system via the backend gives a 403.

I tried using [ServicesController] from Sitecore.Services.Core but did not resolve the issue. Trying it through CORS but any leads on this are welcome.

ERROR SAYS : Strict origin when ross origin

2 Answers 2

2

Your Problem statement, in summary is the proxy service created when hit from the backend gives an error with status code 403 (forbidden)

you are trying to solve it using CORS, that is the correct approach.

you will have to add your proxy service DNS under "AllowedOrigin"

please check the detailed explanation here: https://doc.sitecore.com/xp/en/developers/92/sitecore-experience-manager/cross-origin-resource-sharing--cors-.html

hope this helps.

0

The issue was happening because of Firewall, we created a WAF rule allowing certain request URIs and the issue was resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.