Posts

Showing posts with the label Ruby on rails CORS config

Ruby on Rails configure CORS setting with rack cors gem

Hi, This is  Shubham Mishra  from India,  this is the part of  Ruby on Rails  exploration journey.  In this post we will discuss about the CORS concepts and I am sure you will get excited to make your hands dirty with those code, so why to wait let's get started... What is CORS? Cross-Origin Resource Sharing, sometimes known as CORS, is a security feature built into web browsers that enables web servers to manage which domains can access their resources. It is used to stop rogue websites or programmes from gaining unauthorised access to a web server's resources. In plainer terms, a web browser will submit a CORS request to the server whenever a web application makes a request to a domain other than the one it is currently executing on in order to determine whether it is authorised to access the resources of that domain. The browser can retrieve the resources and show them to the user if the server agrees to the request. Why CORS is important? If COR...