Skip to content

Commit fa96ffe

Browse files
authored
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
1 parent 85706be commit fa96ffe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flask_restx/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,11 @@ def endpoint(self, name):
503503
@property
504504
def specs_url(self):
505505
"""
506-
The Swagger specifications absolute url (ie. `swagger.json`)
506+
The Swagger specifications relative url (ie. `swagger.json`)
507507
508508
:rtype: str
509509
"""
510-
return url_for(self.endpoint("specs"), _external=True)
510+
return url_for(self.endpoint("specs"))
511511

512512
@property
513513
def base_url(self):

0 commit comments

Comments
 (0)