[odrs-web] nginx: Set caching headers for assets
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web] nginx: Set caching headers for assets
- Date: Thu, 28 Apr 2022 07:43:59 +0000 (UTC)
commit 656d7864bf98cbb704109fab0b706b1457028e4c
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Thu Apr 28 09:43:37 2022 +0200
nginx: Set caching headers for assets
nginx.conf | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/nginx.conf b/nginx.conf
index f00390c..7453821 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -54,5 +54,12 @@ http {
proxy_pass http://odrs:8080/;
}
+
+ location ~* \.(?:ico|css|svg|js|json|jpe?g|png)$ {
+ expires 30d;
+ add_header Pragma public;
+ add_header Cache-Control "public";
+ proxy_pass http://odrs:8080;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]