From fa96ffe3f5a58f12c21335304939dcc304608700 Mon Sep 17 00:00:00 2001 From: jslay88 Date: Wed, 2 Sep 2020 12:28:24 -0600 Subject: [PATCH] Use relative path for `api.specs_url`. This resolves any issues with mixed content when running behind an HTTPS reverse proxy. There is no valid use case for using absolute over relative here, and only causes additional issues. Resolves #188 --- flask_restx/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask_restx/api.py b/flask_restx/api.py index bda1c0c1..0eefce8d 100644 --- a/flask_restx/api.py +++ b/flask_restx/api.py @@ -503,11 +503,11 @@ def endpoint(self, name): @property def specs_url(self): """ - The Swagger specifications absolute url (ie. `swagger.json`) + The Swagger specifications relative url (ie. `swagger.json`) :rtype: str """ - return url_for(self.endpoint("specs"), _external=True) + return url_for(self.endpoint("specs")) @property def base_url(self):