Hi, thanks for your reply!
I couldn’t reproduce the exact error this morning and am not sure what’s different… only last thing i’ve tried yesterday was removing and re-adding the base_url
s as far as i recall.
- it looks like the hidden videos are the ones that are pending for migration
- migrated videos currently return
Access-Control-Allow-Origin
errors. Here is an example as requested.
object_storage:
enabled: true
endpoint: 's3.eu-central-003.backblazeb2.com'
region: 'eu-central-003'
credentials:
access_key_id: 'redacted'
secret_access_key: 'redacted'
videos:
bucket_name: 'tube-tchncs-de'
prefix: 'videos/'
base_url: 'https://media.tube.tchncs.de'
streaming_playlists:
bucket_name: 'tube-tchncs-de'
prefix: 'streaming-playlists/'
base_url: 'https://media.tube.tchncs.de'
I have tried to catch the OPTIONS
/ HEAD
requests in similar if
statements as in the exampleconfig on the proxy but had no luck.
Here is the current state of the failing cache proxy:
location @s3 {
# limit_except GET OPTIONS HEAD {
# deny all;
# }
resolver 8.8.8.8;
# proxy_set_header Host https://tube.tchncs.de;
# proxy_set_header Connection '';
# proxy_set_header Authorization '';
# proxy_hide_header Set-Cookie;
# proxy_hide_header 'Access-Control-Allow-Origin';
# proxy_hide_header 'Access-Control-Allow-Methods';
# proxy_hide_header 'Access-Control-Allow-Headers';
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
proxy_hide_header x-amz-meta-server-side-encryption;
proxy_hide_header x-amz-server-side-encryption;
proxy_hide_header x-amz-bucket-region;
proxy_hide_header x-amzn-requestid;
# proxy_ignore_headers Set-Cookie;
proxy_pass $s3_backend$uri;
proxy_intercept_errors off;
proxy_cache tubecache;
proxy_cache_valid 48h;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_lock on;
expires 1y;
add_header Cache-Control public;
add_header 'Access-Control-Allow-Origin' '*'; # switching these to
# proxy_set_header doesn't help
add_header Access-Control-Allow-Methods 'GET, OPTIONS, HEAD';
add_header Access-Control-Allow-Headers 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
add_header X-Cache-Status $upstream_cache_status;
}
I am not sure how to catch this Access-Control-Allow-Origin right now…