From da5c0699dd3accb8a8b4be38443a3a575d61017c Mon Sep 17 00:00:00 2001 From: 134 Date: Mon, 13 Jul 2026 15:43:07 +0800 Subject: [PATCH] fix: serve versioned HiCAD assets directly --- deploy/nginx-hicad-zoo-ws.conf.template | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/deploy/nginx-hicad-zoo-ws.conf.template b/deploy/nginx-hicad-zoo-ws.conf.template index c5af37798..efadff030 100644 --- a/deploy/nginx-hicad-zoo-ws.conf.template +++ b/deploy/nginx-hicad-zoo-ws.conf.template @@ -1,6 +1,24 @@ # Include inside the authenticated HiCAD HTTPS server block. # Replace __AI_CAD_WS_PROXY_SECRET__ during deployment and chmod the rendered file 600. +location ^~ /vendor/zoo-modeling-app/assets/ { + root /var/www/ai-chatbot/public; + try_files $uri =404; + add_header Cache-Control "public, max-age=31536000, immutable" always; +} + +location ^~ /vendor/zoo-modeling-app/fonts/ { + root /var/www/ai-chatbot/public; + try_files $uri =404; + add_header Cache-Control "public, max-age=31536000, immutable" always; +} + +location = /vendor/zoo-modeling-app/kcl_wasm_lib_bg.wasm { + root /var/www/ai-chatbot/public; + try_files $uri =404; + add_header Cache-Control "public, max-age=3600" always; +} + location = /_hicad_zoo_ws_auth { internal; proxy_pass http://127.0.0.1:3125/api/ai-cad/zoo-ws-authorize;