diff --git a/whoogle/CHANGELOG.md b/whoogle/CHANGELOG.md index 6732b74b4..e3ab0057d 100644 --- a/whoogle/CHANGELOG.md +++ b/whoogle/CHANGELOG.md @@ -1,4 +1,7 @@ +- Fix missing images in direct access + ### 0.8.2-3 (03-05-2023) + - Minor bugs fixed - Fix missing images in ingress diff --git a/whoogle/config.json b/whoogle/config.json index 55dd76c04..6041c0b28 100644 --- a/whoogle/config.json +++ b/whoogle/config.json @@ -54,6 +54,9 @@ "/dev/nvme1", "/dev/nvme2" ], + "environment": { + "EXPOSE_PORT": "5001" + }, "image": "ghcr.io/alexbelgium/whoogle-search-{arch}", "ingress": true, "ingress_stream": true, @@ -108,5 +111,5 @@ }, "slug": "whoogle-search", "url": "https://github.com/alexbelgium/hassio-addons/tree/master/whoogle", - "version": "0.8.2-3" + "version": "0.8.2-test3" } \ No newline at end of file diff --git a/whoogle/rootfs/etc/nginx/includes/upstream.conf b/whoogle/rootfs/etc/nginx/includes/upstream.conf index 325245525..cf32c58dd 100644 --- a/whoogle/rootfs/etc/nginx/includes/upstream.conf +++ b/whoogle/rootfs/etc/nginx/includes/upstream.conf @@ -1,3 +1,3 @@ upstream backend { - server 127.0.0.1:5000; + server 127.0.0.1:5001; } diff --git a/whoogle/rootfs/etc/nginx/servers/ingress.conf b/whoogle/rootfs/etc/nginx/servers/ingress.conf index 4adb6ccfe..80beb13f7 100644 --- a/whoogle/rootfs/etc/nginx/servers/ingress.conf +++ b/whoogle/rootfs/etc/nginx/servers/ingress.conf @@ -9,13 +9,12 @@ server { location / { add_header Access-Control-Allow-Origin *; proxy_read_timeout 30; - proxy_pass http://backend; - #Allow frame - proxy_hide_header 'x-frame-options'; - # Correct url for images - sub_filter_once off; - sub_filter_types *; - sub_filter %%ingress_entry_modified%% %%ingress_entry%%; + proxy_pass http://backend%%ingress_entry%%; + # Correct url for images + sub_filter_once off; + sub_filter_types *; + sub_filter %%ingress_entry_modified%%/ /; + sub_filter %%ingress_entry%%/ /; } } diff --git a/whoogle/rootfs/etc/nginx/servers/nginx.conf b/whoogle/rootfs/etc/nginx/servers/nginx.conf new file mode 100644 index 000000000..e5629999f --- /dev/null +++ b/whoogle/rootfs/etc/nginx/servers/nginx.conf @@ -0,0 +1,24 @@ +server { + + listen 5000; + + include /etc/nginx/includes/server_params.conf; + include /etc/nginx/includes/proxy_params.conf; + + client_max_body_size 0; + + location / { + add_header Access-Control-Allow-Origin *; + proxy_read_timeout 30; + proxy_pass http://backend%%ingress_entry%%; + #Allow frame + proxy_hide_header 'x-frame-options'; + # Correct url for images + sub_filter_once off; + sub_filter_types *; + sub_filter %%ingress_entry_modified%%/ /; + sub_filter %%ingress_entry%%/ / ; + } + + +}