davidtinker / grails-cors

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

Added support for Access-Control-Expose-Headers in response. #9

Closed sriddell closed 11 years ago

sriddell commented 11 years ago

I'd like to thank you for this plugin; I was hitting the grails bug that wouldn't allow OPTIONS methods through to my controller when I found your solution.

For the work I'm doing, I needed to support the Access-Control-Expose-Headers in the response; this pull request contains my simple solution to add support as well as tighten the origin checking to be closer to my reading of the W3C spec, along with additional unit tests.

I'd greatly appreciate any feedback/discussion on the proposed changes (whether you agree with them or not). If you disagree with them, or would like to see them implemented differently, please let me know, as I'd much prefer to see the feature added to your plugin than to maintain my own fork.

Thanks again

sriddell commented 11 years ago

Realized there is a potential issue unit tests are not catching. Will correct and re-submit later.