             SessionManager.getInstance().sessionDisconnectedByToken token
             @_onResponse req, res, 200, null, null
 
+    _onOptions: (req, res, appId) ->
+        headers =
+            "Connection": "keep-alive"
+            "Access-Control-Allow-Method": "GET, POST, DELETE, OPTIONS"
+            "Access-Control-Allow-Headers": "Content-Type, Authorization, Accept,X-Requested-With"
+            "Cache-Control": "no-cache, must-revalidate, no-store"
+            "Access-Control-Allow-Origin": "*"
+            "Content-Length": "0"
+        @_onResponse req, res, 200, headers, null
+
+
     _onResponse: (req, res, statusCode, headers, body) ->
         if headers
             res.writeHead statusCode, headers

                    interval: Config.SENDER_SESSION_PP_INTERVAL
                bodyContent = JSON.stringify body
                Log.d "response body ->\n#{bodyContent}"
                res.writeHead statusCode,
                    "Content-Type": "application/json"
                    "Connection": "keep-alive"
                    "Access-Control-Allow-Method": "GET, POST, DELETE, OPTIONS"
                    "Cache-Control": "no-cache, must-revalidate, no-store"
                    "Content-Length": bodyContent.length
                res.end bodyContent
                SessionManager.getInstance().sessionConnected session
            else
                Log.e "bad post request: type is #{type}, appInfo is #{JSON.stringify appInfo}"

                    @_onPost req, res, appId
                when "DELETE"
                    @_onDelete req, res, appId
                when "OPTIONS"
                    @_onOptions req, res, appId
                else
                    Log.e "Unsupport http method: #{method}"
                    @_onResponse req, res, 400, null, null
