Skip to content

Commit

Permalink
PIAWARE_MINIMAL: make it clear the map is disabled (#215)
Browse files Browse the repository at this point in the history
lighttpd: set 'Cache-Control: no-cache' so changes like the map being
disabled are not obscured by the browser cache
  • Loading branch information
wiedehopf authored Nov 28, 2024
1 parent 1dfc09a commit c323c93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions rootfs/etc/lighttpd/skyaware.lighttpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ $HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" {
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
}

setenv.add-response-header = ( "Cache-Control" => "no-cache" )

# Allows access to the static files that provide the skyaware978 map view,
# and also to the dynamically-generated json parts that contain aircraft
# data and are periodically written by the skyaware978 daemon.
Expand Down
6 changes: 5 additions & 1 deletion rootfs/etc/s6-overlay/scripts/01-piaware
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ elif [[ "$UAT_RECEIVER_TYPE" == "rtlsdr" ]]; then
fi

MLAT_RESULTS_STRING="beast,listen,30105 ext_basestation,listen,30106 "
if ! chk_enabled "${PIAWARE_MINIMAL}"; then

if [[ -n "$BEASTHOST" ]] && chk_enabled "${PIAWARE_MINIMAL}"; then
# make it obvious the map is not available when PIAWARE_MINIMAL is set
sed -i -e "s#'/skyaware.*/'#''#g" -e "s/Go to.*SkyAware Map/Map disabled/g" /var/www/html/index.js
else
MLAT_RESULTS_STRING+="beast,connect,localhost:30104 "
fi

Expand Down

0 comments on commit c323c93

Please sign in to comment.