Lyndon Maydwell

Results 34 comments of Lyndon Maydwell

Hi @nalchevanidze , I got pulled away over the Christmas period but am still very keen to continue. I might have another go at trying this from the latest version...

Thanks @nalchevanidze sorry I never got round to coming up with a solution for this!

For those of you who are blocked on the options functionality I've made what I think is a reasonable workaround. I've created a WAI middleware that reflects on your servant...

@alpmestan https://hackage.haskell.org/package/servant-options

@alpmestan I do feel like OPTIONS responses are fairly standard REST-server behaviour. It should probably be folded into servant-server if this is going to be the recommended solution.

@fizruk Nope, if you want to do CORS you probably want to use both like so: import App import Servant import Network.Wai.Middleware.Cors import Network.Wai.Middleware.Servant.Options app :: Application app = logStdoutDev...

@leshow Ah sorry, I've created a seperate library on Hackage now, so I deleted the original source from the project that it was developed in. I'll hard code a commit...

@fizruk Interesting, I just had another look at wai-cors, and it seems that you're right: -- Preflight CORS request "OPTIONS" → runExceptT (preflightHeaders policy) >>= \case Left e → err...

@jkarni What is the package? :)