Browse Source

bug-fixes

imwald
Silberengel 1 month ago
parent
commit
f7f191a135
  1. 4
      package-lock.json
  2. 2
      package.json
  3. 14
      scripts/build-and-push-prod.sh
  4. 8
      src/PageManager.tsx

4
package-lock.json generated

@ -1,12 +1,12 @@ @@ -1,12 +1,12 @@
{
"name": "jumble-imwald",
"version": "19.3.3",
"version": "19.3.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "jumble-imwald",
"version": "19.3.3",
"version": "19.3.4",
"license": "MIT",
"dependencies": {
"@asciidoctor/core": "^3.0.4",

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "jumble-imwald",
"version": "19.3.3",
"version": "19.3.4",
"description": "A user-friendly Nostr client focused on relay feed browsing and relay discovery, forked from Jumble",
"private": true,
"type": "module",

14
scripts/build-and-push-prod.sh

@ -2,6 +2,9 @@ @@ -2,6 +2,9 @@
# Build main app and NIP-66 monitor images locally; push to silberengel/imwald-jumble and silberengel/imwald-jumble-nip66-monitor as :latest and :<version from package.json>.
# Then create git tag v<version> and push it.
# Run from repo root. Requires: docker, docker login, git.
#
# Optional env: JUMBLE_PROXY_SERVER_URL — passed as Docker build-arg VITE_PROXY_SERVER (default site origin).
# Must match Apache: ProxyPass /sites/ → OG backend; the app requests https://<origin>/sites/?url=…
set -e
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@ -12,8 +15,15 @@ GIT_TAG="v${VERSION}" @@ -12,8 +15,15 @@ GIT_TAG="v${VERSION}"
IMAGE_APP="silberengel/imwald-jumble"
IMAGE_MONITOR="silberengel/imwald-jumble-nip66-monitor"
echo "Building main app (version: $VERSION)"
docker build -t "$IMAGE_APP:latest" -t "$IMAGE_APP:$VERSION" .
# OG / link-preview HTML: VITE_PROXY_SERVER is baked into the client bundle at image build time (not runtime).
# Use public origin only (no /proxy path): web.service builds <origin>/sites/?url=…
# Override: JUMBLE_PROXY_SERVER_URL=https://other.example ./scripts/build-and-push-prod.sh
JUMBLE_PROXY_SERVER_URL="${JUMBLE_PROXY_SERVER_URL:-https://jumble.imwald.eu}"
echo "Building main app (version: $VERSION, VITE_PROXY_SERVER=$JUMBLE_PROXY_SERVER_URL)"
docker build \
--build-arg "VITE_PROXY_SERVER=$JUMBLE_PROXY_SERVER_URL" \
-t "$IMAGE_APP:latest" -t "$IMAGE_APP:$VERSION" .
echo "Building NIP-66 monitor (version: $VERSION)"
docker build -t "$IMAGE_MONITOR:latest" -t "$IMAGE_MONITOR:$VERSION" ./nip66-cron

8
src/PageManager.tsx

@ -799,6 +799,14 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) { @@ -799,6 +799,14 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
'/notes' + window.location.pathname + window.location.search + window.location.hash
)
}
// OG HTML proxy (`VITE_PROXY_SERVER`, e.g. https://host/proxy) must be reverse-proxied to the
// fetch service. If /proxy is routed to this SPA, normalize to / so we don't push an unknown URL.
{
const proxyPath = window.location.pathname.split('?')[0].split('#')[0]
if (proxyPath === '/proxy' || proxyPath.startsWith('/proxy/')) {
window.history.replaceState(null, '', '/')
}
}
window.history.pushState(null, '', window.location.href)
if (window.location.pathname !== '/') {
const url = window.location.pathname + window.location.search + window.location.hash

Loading…
Cancel
Save