Skip to content

No option to disable automatic addition of CORS header by Spring SockJS module [SPR-12283] #16888

@spring-projects-issues

Description

@spring-projects-issues

Chandan opened SPR-12283 and commented

Spring sockjs library adds CORS header based on "origin" in the incoming request -unless it detects the header pre-added by Servlet filter or by any other mechanism.
We have a use case where CORS IP white listing is taken care by external system (Say some interceptor). If some how it is bypassed, sockjs will allow connection from any origin (because, incoming "origin" value will be mirrored in header) -opening a security loophole.
If there is an option to disable automatic addition of header, then even if some one hacks into sockjs url directly, browser will throw a CORS error.


Affects: 4.0 GA

Reference URL: http://stackoverflow.com/questions/26037250/how-to-disable-automatic-addition-of-cors-header-in-spring-sockjs-module-of-spri/26104535?noredirect=1#comment40967360_26104535

This issue is a sub-task of #16921

Referenced from: commits 58f4014

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions