platanus / potassium

A Rails application generator by Platanus, inspired by Suspenders
MIT License
232 stars 17 forks source link

feat(cors): use safer api/public-only CORS configuration #271

Closed rjherrera closed 4 years ago

rjherrera commented 4 years ago

This PR modifies the default configuration bundled by the rack-cors recipe. As of today we were allowing requests from any origin to any resource, which is a very unsafe configuration. The new config only allows get requests to the urls under public and index/show/create/update/delete requests for urls under api.

closes #202