homepage: https://github.com/sordina/servant-options
changelog-type: ''
hash: 39f50166a68006250e79370372f553ca476f14d06d93fa0c401050253aeba803
test-bench-deps: {}
maintainer: maydwell@gmail.com
synopsis: Provide responses to OPTIONS requests for Servant applications.
changelog: ''
basic-deps:
  bytestring: -any
  wai: -any
  base: ! '>=4.7 && <5'
  text: -any
  servant-server: -any
  servant-foreign: -any
  http-types: -any
all-versions:
- '0.1.0.0'
author: Lyndon Maydwell
latest: '0.1.0.0'
description-type: markdown
description: ! "## Servant-Options\n\nThis library provides a middleware that returns
  `HTTP OPTIONS` responses for\nvalid application routes defined by your (Proxy ::
  Proxy api).\nIt is especially useful when trying to write an API that can be used\nin
  a cross-origin capacity, as browsers will send \"pre-flight\" checks\nby requesting
  OPTIONS for routes that are about to be called.\n\nBefore:\n\n![](https://github.com/sordina/servant-options/blob/master/images/before.png?raw=true)\n\nAfter:\n\n![](https://github.com/sordina/servant-options/blob/master/images/after.png?raw=true)\n\nUsage:\n\n
  \   module MyApp where\n\n    import App\n    import Servant\n    import Network.Wai.Middleware.Cors\n
  \   import Network.Wai.Middleware.Servant.Options\n\n    app :: Application\n    app
  = logStdoutDev\n        $ cors (const $ Just policy)\n        $ provideOptions apiProxy\n
  \       $ serve apiProxy apiServer\n      where\n      policy = simpleCorsResourcePolicy\n
  \              { corsRequestHeaders = [ \"content-type\" ] }\n\n## See Also\n\n*
  <https://github.com/haskell-servant/servant/issues/278>\n"
license-name: MIT

Update from Hackage at 2017-04-04T04:13:17Z
Update from Hackage at 2017-04-04T04:13:17Z
