From 7b735e368499d84cd2de1cc80c2cabb89d7c1d9e Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Wed, 10 Jan 2024 21:24:59 +0100 Subject: [PATCH] sprites added --- .../http_host/http_host_lib/templates/nginx_cf.conf | 12 ++++++++++++ ssh_lib/kernel.py | 3 +-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/http_host/http_host_lib/templates/nginx_cf.conf b/scripts/http_host/http_host_lib/templates/nginx_cf.conf index 95c753b..b6f32fe 100644 --- a/scripts/http_host/http_host_lib/templates/nginx_cf.conf +++ b/scripts/http_host/http_host_lib/templates/nginx_cf.conf @@ -38,6 +38,18 @@ server { add_header Cache-Control public; } + location /sprites/ { + # trailing slash + + alias /data/ofm/http_host/assets/sprites/; # trailing slash + try_files $uri =404; + + expires 1d; # target 10y + + add_header 'Access-Control-Allow-Origin' '*' always; + add_header Cache-Control public; + } + location /ne2_shaded/ { # trailing slash diff --git a/ssh_lib/kernel.py b/ssh_lib/kernel.py index f6ed870..5e2c1c7 100644 --- a/ssh_lib/kernel.py +++ b/ssh_lib/kernel.py @@ -1,5 +1,4 @@ -from ssh_lib import ASSETS_DIR -from ssh_lib.utils import put, put_str +from ssh_lib.utils import put_str def kernel_somaxconn65k(c):