grails-cors icon indicating copy to clipboard operation
grails-cors copied to clipboard

header are not adding when using 'as JSON' converters

Open harigopalakrishna opened this issue 10 years ago • 4 comments

Plugin seems to not add CORS headers when rendering data as JSON using grails JSON converter. I'm using grails 2.0.3

import grails.converters.JSON class RestaurantApiController{

def summary() { 
    def student=Student.get(params.id)
    render student as JSON
}

}

harigopalakrishna avatar Oct 29 '14 04:10 harigopalakrishna

I just realized that basic rendering is also not adding CORS headers. not sure if i'm missing something here.

render "Hello World"

harigopalakrishna avatar Oct 29 '14 05:10 harigopalakrishna

same

dularion avatar Nov 14 '15 21:11 dularion

Can one of you guys check to see if the servlet filter is being loaded? You can look at any stack trace from a controller and see if 'CorsFilter' is in there somewhere.

davidtinker avatar Nov 30 '15 05:11 davidtinker

Has this issue ever been addressed? I have an issue that is possibly related.

tkmilbaugh avatar Sep 10 '18 14:09 tkmilbaugh