Please helpme.
I use rack_cors gem but not resolved my problem
this is my code
application.rb
config.middleware.insert_before 0, Rack::Cors do
allow do
origins 'localhost', 'http://example.com'
resource '*', :headers => :any, :methods => [:get, :post, :options]
end
end
this is the error
XMLHttpRequest cannot load https://example.com/video.vtt. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.