hice3000
hice3000

Reputation: 186

Symfony2 Routes only for sub-requests

I am creating an advanced app that uses websocket instead of ajax for dynamic interaction. My WebSocket messages are handled like HTTP Requests, they contain a json-encoded array of path and parameters, which will be converted to a Request. Now the HttpKernel handles this request like every other HTTP request (as sub-request). The only problem is, that the routes for websocket messages are public avaible. Has anyone an idea how to allow only internal access for a route in this situation?

Upvotes: 1

Views: 191

Answers (1)

Nicolai Fröhlich
Nicolai Fröhlich

Reputation: 52503

This answer explains why the firewall configuration can't be used to block routes by name as it uses the RequestMatcher which allows only path regexes and not route names.

Upvotes: 0

Related Questions