Closed stas closed 2 years ago
That seems like a good option to add. I'll start working on that.
Looking into it now. Are you using Agoo as a GraphQL server? If so there is an an example that might help: example/graphql/song.rb.
If not using as a GraphQL server then what are you setting the headers to?
@ohler55 we're not using GraphQL. In fact it's a pretty standard RESTful rails app using rack-cors
.
Ok, so I assume that means you are using the #call()
method of the handler. What are you providing as headers?
@ohler55 I'm afraid we're not calling anything directly, as the rack-cors
takes care of it and the headers needed to fulfill the request response.
The configuration we have is pretty much standard as described in their guide: https://github.com/cyu/rack-cors#rails-configuration
Agoo does not add any headers directly for CORS but it does have options for turning on tracing If you are able to turn on some of the debugging information for requests and responses we can see what is being request and sent. From there we can try to determine what middleware layer is setting or not setting the headers.
Can this be closed?
@ohler55 apologies for the delay with this one, unfortunately we didn't manage to make time to look into this further. I believe we can close it for now. Thanks again for helping figure things out! :bow:
Hi there, we tried switching to Agoo a couple of times, both times we'd randomly experience requests failing due to CORS:
Unfortunately I could not figure out what could be the issue, but I thought I'd leave this as a feedback for new users if they are looking into giving Agoo a try.
Thank you for open sourcing this btw!!! :bow: