davidtinker / grails-cors

Grails plugin to add Cross-Origin Resource Sharing (CORS) headers
38 stars 21 forks source link

problem with Spring Security #13

Closed randomailer closed 11 years ago

randomailer commented 11 years ago

Hi, I'm trying to use your plugin with this configuration:

cors.url.pattern = '/api/*'
cors.headers = [
    'Access-Control-Allow-Origin': '*'
]

and it's ok, but when I set

grails.plugins.springsecurity.apf.filterProcessesUrl = '/api/v1/auth'

after that, the first request OPTIONS returns with origin failed

please help.

davidtinker commented 11 years ago

I will have a look as soon as I can. Very busy with day job right now. Likely the Spring Security filter is getting at the request before the CORS filter and nuking the OPTIONS request.

davidtinker commented 11 years ago

Fixed by PR #16

randomailer commented 10 years ago

Hi, after browser send options and receive responce, browser send original request and result: redirect to authajax. This is behavior spring security. What i doing wrong? How fix this?