Prevent stale frontend assets in Docker
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- Added `POST /api/v1/analysis/change-detection` for synchronous comparison of two vector datasets in the same project.
|
||||
- Added a `ChangeDetectionService` that prefers persisted `vector_features`, falls back to stored GeoJSON with an explicit warning, and returns added/removed/unchanged GeoJSON features.
|
||||
- Added a frontend Change Detection panel and MapLibre change overlay styling for added, removed and unchanged geometries.
|
||||
- Added nginx no-cache headers for frontend HTML/assets so LAN Docker rebuilds are visible without stale browser modules.
|
||||
- Added backend tests for persisted vector feature comparison and canonical API envelope behavior.
|
||||
- No migrations, live provider fetching, AI inference, new dependencies, LiDAR, Copilot, Training Studio or separate Reports module were introduced.
|
||||
|
||||
|
||||
@@ -78,6 +78,8 @@ def test_frontend_uses_same_origin_api_proxy_by_default() -> None:
|
||||
assert "location /api/" in nginx_config
|
||||
assert "proxy_pass http://backend:8000/api/" in nginx_config
|
||||
assert "location = /health" in nginx_config
|
||||
assert 'add_header Cache-Control "no-cache"' in nginx_config
|
||||
assert "location /assets/" in nginx_config
|
||||
assert "try_files $uri $uri/ /index.html" in nginx_config
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ Changed:
|
||||
- Added `POST /api/v1/analysis/change-detection` for comparing two vector datasets in the same project through the existing synchronous job envelope.
|
||||
- Added `ChangeDetectionService` with persisted `vector_features` as the primary source of comparable geometries and explicit stored-GeoJSON fallback warnings for older datasets.
|
||||
- Added frontend Change Detection controls, summary counts and MapLibre overlay styling for `added`, `removed` and `unchanged` feature properties.
|
||||
- Added nginx no-cache headers for frontend HTML/assets after browser verification exposed stale cached modules on the LAN deployment.
|
||||
- Added backend tests for persisted-vector comparison and canonical API envelope behavior.
|
||||
|
||||
Limitations:
|
||||
|
||||
@@ -5,6 +5,16 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache";
|
||||
try_files /index.html =404;
|
||||
}
|
||||
|
||||
location /assets/ {
|
||||
add_header Cache-Control "no-cache";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8000/api/;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Reference in New Issue
Block a user