From 2b5bf1fa75b32233e5f161568c234b57a9e1110e Mon Sep 17 00:00:00 2001 From: "Vyacheslav N. Boyko" Date: Tue, 15 Mar 2022 13:58:00 +0300 Subject: [PATCH] exploring documents statuses --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 8e5fbbc..a503589 100644 --- a/index.html +++ b/index.html @@ -28,8 +28,9 @@ initRedoc(); } - var api_url = 'https://profee-waas.github.io/pf-waas-api/waas-api.json'; - + var isLocalhost = location.hostname === "localhost" || location.hostname === "127.0.0.1"; + var api_url = isLocalhost ? '/waas-api.json' : 'https://profee-waas.github.io/pf-waas-api/waas-api.json'; + function initRedoc() { Redoc.init(api_url, {"pathInMiddlePanel":true}); }