diff --git a/entrypoint b/entrypoint index 69511b3c..60b33596 100755 --- a/entrypoint +++ b/entrypoint @@ -15,9 +15,12 @@ fi CLIENT_CONFIG=$(echo "$SOUR_CONFIG" | jq '.client') # Inject the runtime configuration into the frontend's code -echo "const INJECTED_SOUR_CONFIG = $CLIENT_CONFIG;" >> /tmp/out.js -cat /app/index.js >> /tmp/out.js -cp /tmp/out.js /app/index.js +# When a container is restarted, the previous FS state still exists, so detect this +if ! grep -q "INJECTED_SOUR_CONFIG" /app/index.js; then + echo "const INJECTED_SOUR_CONFIG = $CLIENT_CONFIG;" >> /tmp/out.js + cat /app/index.js >> /tmp/out.js + cp /tmp/out.js /app/index.js +fi wsproxy 28785 & nginx -g 'daemon off;' & diff --git a/services/go/pkg/assets/roots.go b/services/go/pkg/assets/roots.go index ec827e66..c5e664b3 100644 --- a/services/go/pkg/assets/roots.go +++ b/services/go/pkg/assets/roots.go @@ -103,7 +103,7 @@ func NewRemoteRoot( var index Index if err := cbor.Unmarshal(indexData, &index); err != nil { - return nil, err + return nil, fmt.Errorf("error decoding %s: %s", url, err) } root := RemoteRoot{ diff --git a/services/go/svc/cluster/ingress/ws.go b/services/go/svc/cluster/ingress/ws.go index 3c286b16..3df0491c 100644 --- a/services/go/svc/cluster/ingress/ws.go +++ b/services/go/svc/cluster/ingress/ws.go @@ -469,7 +469,7 @@ func (server *WSIngress) ServeHTTP(w http.ResponseWriter, r *http.Request) { }) if err != nil { - log.Error().Err(err).Msg("error accepting client connection") + // ignore invalid requests return }