def get_tags(self, path, method): if path.endswith('/new/'): tags = ['tag1', 'tag2'] elif path.endswith('/old/'): tags = ['tag2', 'tag3'] else: tags = ['tag4', 'tag5'] return tags
def _serve_with_headers_fixed(request, path, insecure=False, **kwargs): response = serve(request, path, insecure=insecure, **kwargs) # Allow loading of github-btn.html in an <iframe> if path.startswith("3rdparty/github-buttons-") and path.endswith( "/docs/github-btn.html"): response["X-Frame-Options"] = "sameorigin" return response
def _serve_with_headers_fixed(request, path, insecure=False, **kwargs): response = serve(request, path, insecure=insecure, **kwargs) # Allow loading of github-btn.html in an <iframe> if (path.startswith('3rdparty/github-buttons-') and path.endswith('/docs/github-btn.html')): response['X-Frame-Options'] = 'sameorigin' return response