Support CORS preflight requests.
Move queue start call to the global scope.