feat: add scoped image sync endpoint
This commit is contained in:
@@ -57,6 +57,18 @@ http {
|
||||
proxy_request_buffering on;
|
||||
}
|
||||
|
||||
location = /v1/sync {
|
||||
limit_except POST { deny all; }
|
||||
client_max_body_size 4k;
|
||||
proxy_pass http://image-hook:8081/v1/sync;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Image-Client $http_x_image_client;
|
||||
proxy_set_header X-Image-Timestamp $http_x_image_timestamp;
|
||||
proxy_set_header X-Image-Request-Id $http_x_image_request_id;
|
||||
proxy_set_header X-Image-Signature $http_x_image_signature;
|
||||
proxy_request_buffering on;
|
||||
}
|
||||
|
||||
location ^~ /v1/admin/ { return 404; }
|
||||
location = /image { return 404; }
|
||||
location = /image/ { return 404; }
|
||||
|
||||
@@ -9,7 +9,7 @@ state_dir="$repository_dir/runtime-data"
|
||||
umask 077
|
||||
mkdir -p "$secret_dir"
|
||||
mkdir -p "$state_dir"
|
||||
for name in gitea_webhook_secret image_admin_secret; do
|
||||
for name in gitea_webhook_secret image_admin_secret image_sync_core_secret image_sync_core2026_secret; do
|
||||
path="$secret_dir/$name"
|
||||
if [ ! -e "$path" ]; then
|
||||
openssl rand -hex 32 > "$path"
|
||||
|
||||
Reference in New Issue
Block a user