I would like to do cross origin communication using Grails in server side. The only documentation that I found is this one
https://grails.org/plugin/cors
but thi
You should use grails 3's new Interceptor API. (https://grails.github.io/grails-doc/3.0.x/guide/single.html#interceptors)
You can create an interceptor with the grails create-interceptor
command. For a CORS Interceptor I would use the after()
method of this Interceptor, and set it up to match all requests (or just the requests you need). You can use the response
object in this method, so setting the headers should be similar to the case described in the Spring documentation.