cherry-pick f45dce34
This commit is contained in:
parent
3c99bf455e
commit
10f96391f1
1 changed files with 3 additions and 1 deletions
|
|
@ -817,7 +817,9 @@ def create_app(args):
|
|||
async def get_response(self, path: str, scope):
|
||||
response = await super().get_response(path, scope)
|
||||
|
||||
if path.endswith(".html"):
|
||||
is_html = path.endswith(".html") or response.media_type == "text/html"
|
||||
|
||||
if is_html:
|
||||
response.headers["Cache-Control"] = (
|
||||
"no-cache, no-store, must-revalidate"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue