improve CORS deteciton

improve CORS deteciton (chat.example.net exemple.net), remove hardcoded http-bind