mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 17:41:33 +03:00
Merge pull request #2605 from urbit/la-cache-control
server: add basic cache-control for faster load speeds
This commit is contained in:
commit
16b4e2e8e4
@ -57,15 +57,18 @@
|
||||
++ gen
|
||||
|%
|
||||
::
|
||||
++ max-1-da ['cache-control' 'max-age=86400']
|
||||
++ max-1-wk ['cache-control' 'max-age=604800']
|
||||
::
|
||||
++ html-response
|
||||
|= =octs
|
||||
^- simple-payload:http
|
||||
[[200 ['content-type' 'text/html']~] `octs]
|
||||
[[200 [['content-type' 'text/html'] max-1-wk ~]] `octs]
|
||||
::
|
||||
++ js-response
|
||||
|= =octs
|
||||
^- simple-payload:http
|
||||
[[200 ['content-type' 'text/javascript']~] `octs]
|
||||
[[200 [['content-type' 'text/javascript'] max-1-da ~]] `octs]
|
||||
::
|
||||
++ json-response
|
||||
|= =octs
|
||||
@ -75,7 +78,7 @@
|
||||
++ css-response
|
||||
|= =octs
|
||||
^- simple-payload:http
|
||||
[[200 ['content-type' 'text/css']~] `octs]
|
||||
[[200 [['content-type' 'text/css'] max-1-da ~]] `octs]
|
||||
::
|
||||
++ manx-response
|
||||
|= man=manx
|
||||
@ -85,12 +88,12 @@
|
||||
++ png-response
|
||||
|= =octs
|
||||
^- simple-payload:http
|
||||
[[200 ['content-type' 'image/png']~] `octs]
|
||||
[[200 [['content-type' 'image/png'] max-1-wk ~]] `octs]
|
||||
::
|
||||
++ woff2-response
|
||||
|= =octs
|
||||
^- simple-payload:http
|
||||
[[200 ['content-type' 'font/woff2']~] `octs]
|
||||
[[200 [['content-type' 'font/woff2'] max-1-wk ~]] `octs]
|
||||
::
|
||||
++ not-found
|
||||
^- simple-payload:http
|
||||
|
Loading…
Reference in New Issue
Block a user