diff --git a/codex/CHANGELOG.md b/codex/CHANGELOG.md index 7e0f958bd..0e15b3082 100644 --- a/codex/CHANGELOG.md +++ b/codex/CHANGELOG.md @@ -1,2 +1 @@ -### 1.0 (02-03-2024) - New addon diff --git a/codex/config.json b/codex/config.json index e8b6cf7fa..4d4744192 100644 --- a/codex/config.json +++ b/codex/config.json @@ -63,6 +63,8 @@ "PUID": "0" }, "image": "ghcr.io/alexbelgium/codex-{arch}", + "ingress": true, + "ingress_stream": true, "map": [ "addon_config:rw", "media:rw", @@ -99,6 +101,5 @@ "slug": "codex", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1.0", - "webui": "[PROTO:ssl]://[HOST]:[PORT:9810]" + "version": "1.4.3" } diff --git a/codex/rootfs/etc/cont-init.d/99-run.sh b/codex/rootfs/etc/cont-init.d/99-run.sh index 88651b610..c8e2145c5 100755 --- a/codex/rootfs/etc/cont-init.d/99-run.sh +++ b/codex/rootfs/etc/cont-init.d/99-run.sh @@ -26,7 +26,7 @@ declare ingress_interface declare ingress_port #declare keyfile -FB_BASEURL=$(bashio::addon.ingress_entry) +FB_BASEURL="$(bashio::addon.ingress_entry)" export FB_BASEURL declare ADDON_PROTOCOL=http @@ -48,10 +48,14 @@ mkdir -p /var/log/nginx && touch /var/log/nginx/error.log for file in /config/hypercorn.toml $(find /usr -name hypercorn.toml.default); do if [ -f "$file" ]; then sed -i "/root_path/d" "$file" - echo "root_path = \"${FB_BASEURL}\"" >> "$file" + sed -i "1a root_path = \"${FB_BASEURL}\"" "$file" fi done +# Export CSRF +export CSRF_TRUSTED_ORIGINS="http://localhost,http://192.168.178.23" +export ALLOWED_HOSTS="*" + ############## # LAUNCH APP # ############## @@ -60,8 +64,8 @@ bashio::log.warning "Default password admin:admin..." bashio::log.info "Starting..." # shellcheck disable=SC2086 -/./usr/local/bin/codex +/./usr/local/bin/codex & true -bashio::net.wait_for 8080 localhost 900 || true +bashio::net.wait_for 9810 localhost 900 || true bashio::log.info "Started !" -exec nginx0 +exec nginx diff --git a/codex/rootfs/etc/nginx/servers/ingress.conf b/codex/rootfs/etc/nginx/servers/ingress.conf index d9269cbeb..7ce5e3aed 100644 --- a/codex/rootfs/etc/nginx/servers/ingress.conf +++ b/codex/rootfs/etc/nginx/servers/ingress.conf @@ -7,7 +7,12 @@ server { client_max_body_size 0; location / { + # Allow frames + ## proxy_hide_header "Content-Security-Policy"; + add_header X-Frame-Options SAMEORIGIN; # Required for ingress frame add_header Access-Control-Allow-Origin *; + proxy_set_header Accept-Encoding ""; + proxy_connect_timeout 30m; proxy_send_timeout 30m; proxy_read_timeout 30m; diff --git a/codex/updater.json b/codex/updater.json index 770903cc1..b78266fa6 100644 --- a/codex/updater.json +++ b/codex/updater.json @@ -1,10 +1,9 @@ { "github_beta": "true", - "last_update": "16-09-2023", - "paused": true, + "last_update": "06-03-2024", "repository": "alexbelgium/hassio-addons", "slug": "codex", "source": "github", "upstream_repo": "ajslater/codex", - "upstream_version": "2.25.0" + "upstream_version": "1.4.3" }