From 27f121643489cf597369abf206b8e6c3b77827b7 Mon Sep 17 00:00:00 2001 From: ION606 Date: Mon, 25 Aug 2025 18:07:05 -0400 Subject: [PATCH] selinux fix --- Caddyfile | 21 +++++++++++---------- docker-compose.yml | 1 - setup.sh | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Caddyfile b/Caddyfile index 70ef180..3c7483d 100644 --- a/Caddyfile +++ b/Caddyfile @@ -8,41 +8,42 @@ @paste host {env.PASTE_DOMAIN} handle @paste { - # privatebin ui reverse_proxy privatebin:8080 } @files host {env.FILES_DOMAIN} handle @files { - # lufi ui reverse_proxy lufi:8081 } @short host {env.SHORT_DOMAIN} handle @short { - # shlink ui/api default reverse_proxy shlink:8080 } - # --- adapter endpoint so privatebin can call a simple ?link=... and get a plain-text short url --- - # this lives on the same short domain; it just proxies to your tiny bun adapter service - @shorten host {env.SHORT_DOMAIN} && path /shorten + # adapter endpoint on the short domain + @shorten { + host {env.SHORT_DOMAIN} + path /shorten + } handle @shorten { - # allow browser calls from your privatebin origin header { Access-Control-Allow-Origin https://{env.PASTE_DOMAIN} Access-Control-Allow-Methods GET, OPTIONS Access-Control-Allow-Headers * - # do not cache shortened responses; they contain the full (keyed) url Cache-Control no-store } - # forward to the adapter (which turns GET ?link=... into a shlink POST and replies with text) reverse_proxy shlink-adapter:3000 } # preflight for /shorten - @shortenPre host {env.SHORT_DOMAIN} && method OPTIONS && path /shorten + @shortenPre { + host {env.SHORT_DOMAIN} + method OPTIONS + path /shorten + } respond @shortenPre 204 respond "unauthorized domain" 404 } + diff --git a/docker-compose.yml b/docker-compose.yml index cdaacb1..48aedcf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -76,7 +76,6 @@ services: environment: - DEFAULT_DOMAIN=${SHORT_DOMAIN} - IS_HTTPS_ENABLED=true - - GEOLITE_LICENSE_KEY=${SHLINK_GEOLITE_KEY} - DB_DRIVER=postgres - DB_HOST=shlink-db - DB_NAME=shlink diff --git a/setup.sh b/setup.sh index e5ad57e..bd41ca5 100644 --- a/setup.sh +++ b/setup.sh @@ -5,11 +5,11 @@ PASTE_DOMAIN=bin.ion606.com FILES_DOMAIN=tfiles.ion606.com SHORT_DOMAIN=s.ion606.com +INITIAL_API_KEY=$(openssl rand -hex 32) LUFI_SECRET=$(openssl rand -hex 32) + SHLINK_DB_PASSWORD=$(openssl rand -hex 24) -SHLINK_GEOLITE_KEY=YOUR_MAXMIND_KEY SHLINK_API_KEY=$(openssl rand -hex 32) EOF sudo chmod 644 Caddyfile -