App reviews, troubleshooting, and recommendations
I have implemented https://shopify.dev/api/admin-rest/2022-10/resources/recurringapplicationcharge#post-recurring-appli... and while redirecting the store admin to confirmation url in the billing response, I am facing CORS issue.
Access to fetch at 'https://abc.myshopify.com/admin/charges/11/22/RecurringApplicationCharge/confirm_recurring_applicati...' (redirected from 'http://localhost:3000/?embedded=1&hmac=aa&locale=en&plan_id=1&session=aa&shop=abc.myshopify.com&time...') from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I am using rails 7, added rack-cors gem and the cors.rb initializer has
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*', headers: :any, methods: [:get, :post, :patch, :put, :options]
end
end
How to fix this issue?
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025