Personalized checkout and custom promotions with Shopify Scripts
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello fellow developers. I am currently implementing a feature for my shopify store, in order to redirect users to the proper URL including locale based on current country (javascript). To achieve that, I will need to redirect users coming from Austria to the German locale (DE) since both countries speak German. For testing the feature, I will need to change the request country in my browser. So far I tried to change browser's location using Sensors as described here https://nordvpn.com/blog/change-location-google-chrome/#:~:text=Choosing%20custom%20locations%20in%2... but Shopify doesn't allow me to set the request location. I looked it up and it seems that the only way is by changing request's HTTP headers as shown below:
Access-Control-Allow-Credentials: true Access-Control-Allow-Origin: ${origin_domain}
I already found this link https://shopify.dev/changelog/storefront-api-allows-for-cross-origin-resource-sharing although not sure if I can use it somehow for my case.
Does anyone knows if there is a way to change HTTP headers in Shopify?
Thank you in advance