Cantido/liberator

Getting an "OPTIONS" request does not return Options

Cantido opened this issue · 0 comments

Describe the bug
The HTTP response to an OPTIONS request does not contain the required allow header

To Reproduce
Steps to reproduce the behavior:

  1. Set up a Phoenix or Plug project
  2. Add a default Liberator.Resource, with routes to it
  3. Submit an OPTIONS request to the server

Expected behavior
The response contains an allow header containing the values returned from Liberator.Resource.allowed_methods/1

Additional context
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS