Skip to content

Commit

Permalink
Add max-age Cache-Control header to kernel logos
Browse files Browse the repository at this point in the history
Issue: #702
  • Loading branch information
divyansshhh committed Mar 26, 2022
1 parent e0c126f commit 5bcd59e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jupyter_server/kernelspecs/handlers.py
Expand Up @@ -19,6 +19,8 @@ def initialize(self):
@authorized
def get(self, kernel_name, path, include_body=True):
ksm = self.kernel_spec_manager
if path.lower().endswith(".png"):
self.set_header("Cache-Control", "max-age=1000")
try:
self.root = ksm.get_kernel_spec(kernel_name).resource_dir
except KeyError as e:
Expand Down

0 comments on commit 5bcd59e

Please sign in to comment.