From f6d032348531ee5aa1549415853494f28bdd7ac1 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 19 Sep 2022 16:11:08 +0200 Subject: [PATCH] ZRColaWS: Stop setting API server in Swagger UI Host where the webservice is listening is not the same as host where clients connect to. Unless localhost, but that limits use of Swagger UI for internal use only. And, not to forget: reverse proxy that will typically run in front of ZRCola web service and will publish it with who knows what public URL. Signed-off-by: Simon Rozman --- ZRColaWS/appcomponent.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ZRColaWS/appcomponent.hpp b/ZRColaWS/appcomponent.hpp index 001c428..cc7346c 100644 --- a/ZRColaWS/appcomponent.hpp +++ b/ZRColaWS/appcomponent.hpp @@ -59,9 +59,7 @@ public: .setContactUrl("https://zrcola.zrc-sazu.si/en/") .setLicenseName("GNU General Public License, Version 3") - .setLicenseUrl("https://www.gnu.org/licenses/gpl-3.0.en.html") - - .addServer(oatpp::String("http://") + m_address.host + ":" + std::to_string(m_address.port), "API Server"); + .setLicenseUrl("https://www.gnu.org/licenses/gpl-3.0.en.html"); return builder.build(); }());