Skip to content

Commit af2618d

Browse files
Added strict_slashes=True to avoid relative path's problem
1 parent 0a3b9f3 commit af2618d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flask_apidoc/apidoc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def init_app(self, app):
4646
if not self.url_path.endswith('/'):
4747
url += '/'
4848

49-
app.add_url_rule(url, 'docs', self.__send_static_file)
50-
app.add_url_rule(url + '<path:path>', 'docs', self.__send_static_file)
49+
app.add_url_rule(url, 'docs', self.__send_static_file, strict_slashes=True)
50+
app.add_url_rule(url + '<path:path>', 'docs', self.__send_static_file, strict_slashes=True)
5151

5252
@lru_cache()
5353
def __get_project_info(self):

0 commit comments

Comments
 (0)