From 144807bc3c8a1c17722f9c072936b67897f7b0dd Mon Sep 17 00:00:00 2001 From: chultquist Date: Tue, 7 Jun 2016 09:52:21 +0100 Subject: [PATCH] Allow requests to POST in OPTIONS requests Commit 65eb248209b5fdc9d1d430c0403fc6bfee1057f4 introduced a bug by not allowing the POST method in OPTIONS requests (which is wrong since several parts of the API accept POST requests, for example creating a new kernel). --- notebook/base/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/base/handlers.py b/notebook/base/handlers.py index 686dcb93b..c05628f17 100644 --- a/notebook/base/handlers.py +++ b/notebook/base/handlers.py @@ -390,7 +390,7 @@ class APIHandler(IPythonHandler): def options(self, *args, **kwargs): self.set_header('Access-Control-Allow-Headers', 'accept, content-type') self.set_header('Access-Control-Allow-Methods', - 'GET, PUT, PATCH, DELETE, OPTIONS') + 'GET, PUT, POST, PATCH, DELETE, OPTIONS') self.finish()