Improve lighthouse score by enabling css/js cache and compression
This commit is contained in:
parent
aeeffda366
commit
9e7ac3c166
@ -13,6 +13,9 @@
|
||||
- ansible.builtin.set_fact:
|
||||
server: |
|
||||
location / {
|
||||
gzip on;
|
||||
gzip_types application/javascript text/javascript text/css;
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
@ -26,6 +29,10 @@
|
||||
chunked_transfer_encoding off;
|
||||
proxy_pass https://storage_nemunaire/{{ bucket }}{{ path }}/;
|
||||
|
||||
if ($uri ~ (.css|.js|.jpg|.png|.webp|.ico|.woff|.woff2|.ttf)$) {
|
||||
expires max;
|
||||
}
|
||||
|
||||
{% for error_page in error_pages %}
|
||||
error_page {{ error_page }} {{ error_pages[error_page] }};
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user