From 798fc8acefb0649abaf7fad970231c5f5fe51a69 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 3 Sep 2015 22:33:35 +0200 Subject: [PATCH] move swagger API handler off of existing `/api` that spot was already taken also set the content-type correctly --- notebook/services/api/handlers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebook/services/api/handlers.py b/notebook/services/api/handlers.py index 4230b5dc8..c13b4721b 100644 --- a/notebook/services/api/handlers.py +++ b/notebook/services/api/handlers.py @@ -15,8 +15,9 @@ class APIHandler(web.StaticFileHandler, IPythonHandler): @web.authenticated def get(self): self.log.debug("Serving api") + self.set_header('Content-Type', 'text/x-yaml') return web.StaticFileHandler.get(self, 'api.yaml') default_handlers = [ - (r"/api", APIHandler) + (r"/api/spec.yaml", APIHandler) ]