From a7d2325841317d7bec2075f74f248666488f3e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20J=C3=BCrges?= Date: Sun, 4 Aug 2024 11:29:45 +0200 Subject: [PATCH] added redirect to pull non-existant local assets from live_endpoint url --- root/defaults/default | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/root/defaults/default b/root/defaults/default index a31c772..965330e 100644 --- a/root/defaults/default +++ b/root/defaults/default @@ -1,7 +1,16 @@ server { - listen ${NGINX_PORT}; - location / { - root /assets; - autoindex on; - } -} + listen ${NGINX_PORT}; + + set $v_filename nf; + + location ~ ^/(.*)$ { + try_files $uri $uri/ @netboot; + set $v_filename $1; + root /assets; + autoindex on; + } + + location @netboot { + return 302 https://github.com/netbootxyz/$v_filename; + } +} \ No newline at end of file