OxygenFramework / Oxygen.jl

💨 A breath of fresh air for programming web apps in Julia
https://oxygenframework.github.io/Oxygen.jl/
MIT License
409 stars 25 forks source link

How to use CORS middleware with Websockets #199

Closed bryaan closed 3 months ago

bryaan commented 3 months ago

https://github.com/OxygenFramework/Oxygen.jl/blob/b460bfe2ce1b7cbe9aa19f25d14c78a9c48886f2/demo/corsdemo.jl#L7

When using this CORS middelware with a websocket connection I get:

│ ArgumentError: invalid JSON at byte position 0 while parsing type Any: UnexpectedEOF

On r = handle(req)

How to handle this?