Added code to check web socket origins