fix: remove stale gzip/brotli of appsettings.json so ApiUrl patch takes effect

This commit is contained in:
MickLesk
2026-05-18 11:40:45 +02:00
parent 20924fac4c
commit 966a859f35
2 changed files with 9 additions and 2 deletions

View File

@@ -80,10 +80,14 @@ $STD dotnet build AliasVault.Client/AliasVault.Client.csproj \
$STD dotnet publish AliasVault.Client/AliasVault.Client.csproj \
-c Release -o /opt/aliasvault/client --no-restore
# Clear the hardcoded localhost:5092 API URL so the client uses its own origin + /api/
# Also remove pre-compressed copies so nginx (gzip_static on) serves the patched file
python3 -c "
import json, pathlib
p = pathlib.Path('/opt/aliasvault/client/wwwroot/appsettings.json')
c = json.loads(p.read_text()); c['ApiUrl'] = ''; p.write_text(json.dumps(c, indent=2))
for ext in ['.gz', '.br']:
q = pathlib.Path(str(p) + ext)
if q.exists(): q.unlink()
"
$STD dotnet publish AliasVault.Admin/AliasVault.Admin.csproj \
-c Release -o /opt/aliasvault/admin --no-restore