Module: check_mk
Branch: master
Commit: 25a033337c4272896c3bb45252a014e5d6168f2e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=25a033337c4272…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Apr 23 10:12:06 2019 +0200
Use a local copy of run-clang-tidy.py.
This contains a few important fixes from HEAD (correctly synchronized and
flushed output) plus a few local minor tweaks for prettier output.
Change-Id: I5e3158133a2be79e545e27a33599420b5ba060d1
---
Makefile | 2 -
livestatus/src/Makefile.am | 5 +-
livestatus/src/test/Makefile.am | 5 +-
scripts/run-clang-tidy.py | 327 ++++++++++++++++++++++++++++++++++++++++
tests/find-python-files | 1 +
5 files changed, 336 insertions(+), 4 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=25a033337c…
Module: check_mk
Branch: master
Commit: b66c1a427407c34edcfffee9a89d42305fc395b6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b66c1a427407c3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 23 12:48:24 2019 +0200
Set CORS header for webapi before authentication
Change-Id: I27738c207363370cf6100b9a55e956d3b5d90a6e
---
cmk/gui/htmllib.py | 7 +++++++
cmk/gui/webapi.py | 2 --
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/cmk/gui/htmllib.py b/cmk/gui/htmllib.py
index 10b534b..a2b0c40 100644
--- a/cmk/gui/htmllib.py
+++ b/cmk/gui/htmllib.py
@@ -1029,8 +1029,15 @@ class html(HTMLGenerator):
self._init_screenshot_mode()
self._init_debug_mode()
+ self._init_webapi_cors_header()
self.init_theme()
+ def _init_webapi_cors_header(self):
+ # Would be better to put this to page individual code, but we currently have
+ # no mechanism for a page to set do this before the authentication is made.
+ if self.myfile == "webapi":
+ self.response.headers["Access-Control-Allow-Origin"] = "*"
+
def init_theme(self):
self.set_theme(config.ui_theme)
diff --git a/cmk/gui/webapi.py b/cmk/gui/webapi.py
index 86623d2..c1e246f 100644
--- a/cmk/gui/webapi.py
+++ b/cmk/gui/webapi.py
@@ -119,8 +119,6 @@ _FORMATTERS = {
@cmk.gui.pages.register("webapi")
def page_api():
try:
- html.response.headers["Access-Control-Allow-Origin"] = "*"
-
pretty_print = False
if not html.request.has_var("output_format"):
html.set_output_format("json")