I have implemented https://shopify.dev/api/admin-rest/2022-10/resources/recurringapplicationcharge#post-recurring-application-charges 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_application_charge?signature=123asd’ (redirected from ‘http://localhost:3000/?embedded=1&hmac=aa&locale=en&plan_id=1&session=aa&shop=abc.myshopify.com×tamp=1673080518’) 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?