Enable validation according to WebSocket resource and origin.