Skip to content

Releases: jdesrosiers/sinatra-cors

v1.2.0

26 Jul 22:57
Compare
Choose a tag to compare

This release allows you to use a regular expression for the :allow_origin setting. Thanks to @frm for the contribution.

v1.1.0

06 Oct 01:48
Compare
Choose a tag to compare

This version changes the behavior when an origin is not allowed. Previously, it returned the value "null" for Access-Control-Allowed-Origin. Although this is compliant with the specification, it seems that there are ways that this can be exploited to grant access when it should not be granted.

Therefore, this implementation now responds with no Access-Control headers if the origin is not allowed. Thanks to @Akcbryant for making this happen.

v1.0.2

04 Oct 22:34
Compare
Choose a tag to compare

This release fixes a bug related to the Access-Control-Allow-Headers header. If the Access-Control-Request-Headers header is not passed, Access-Control-Allow-Headers was being set to nil. Which then causes rack to through an error.

v1.0.1

30 Jul 05:32
Compare
Choose a tag to compare

Change from space-separated to comma separated configuration to match the CORS spec more closely.

v1.0.0

27 Jul 03:59
Compare
Choose a tag to compare

Update for Sinatra 2.0

v0.2.0

29 Jun 06:11
Compare
Choose a tag to compare

It now builds the correct Allow header based on the user defined routes. Having a proper Allow header, allows us to reject a preflight request for a method that is in allow_methods but has no matching route for that method.

v0.1.1

29 Jun 01:11
Compare
Choose a tag to compare

Initial release.

  • Support for all CORS headers
  • Handles OPTIONS requests for preflight requests automatically
  • Follows security best practices for CORS
  • Logs to the default logger to assist the user in configuring the server properly and securely.