fix: Do not cache csrf token
This commit is contained in:
parent
0aabe737a3
commit
2584b77cf1
1 changed files with 3 additions and 2 deletions
|
|
@ -58,7 +58,9 @@ class TemplatePage(BaseTemplatePage):
|
|||
return (frappe.as_unicode(f'{search_path}{d}') for d in ('', '.html', '.md', '/index.html', '/index.md'))
|
||||
|
||||
def render(self):
|
||||
return build_response(self.path, self.get_html(), self.http_status_code, self.headers)
|
||||
html = self.get_html()
|
||||
html = self.add_csrf_token(html)
|
||||
return build_response(self.path, html, self.http_status_code, self.headers)
|
||||
|
||||
@cache_html
|
||||
def get_html(self):
|
||||
|
|
@ -73,7 +75,6 @@ class TemplatePage(BaseTemplatePage):
|
|||
|
||||
html = self.render_template()
|
||||
html = self.update_toc(html)
|
||||
html = self.add_csrf_token(html)
|
||||
|
||||
return html
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue