Skip to content

Commit 43c7baa

Browse files
committed
resolved headers for s3 gateway
1 parent ae25767 commit 43c7baa

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

install.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,16 @@ server {
528528
proxy_hide_header 'Access-Control-Max-Age';
529529
530530
# CORS - allow all origins
531+
# IMPORTANT: Wildcards in Access-Control-Expose-Headers do NOT work for
532+
# credentialed requests (requests with Authorization header). The browser
533+
# ignores wildcards and won't expose custom headers to JavaScript/WASM.
534+
# This caused FxFiles encryption to fail in WebUI - files appeared as
535+
# non-encrypted because x-amz-meta-x-fula-* headers were not visible.
536+
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers
531537
add_header 'Access-Control-Allow-Origin' '*' always;
532538
add_header 'Access-Control-Allow-Methods' 'GET, HEAD, PUT, POST, DELETE, OPTIONS' always;
533539
add_header 'Access-Control-Allow-Headers' '*' always;
534-
add_header 'Access-Control-Expose-Headers' 'ETag, x-amz-meta-*' always;
540+
add_header 'Access-Control-Expose-Headers' 'ETag, Content-Length, Content-Type, Last-Modified, x-amz-meta-x-fula-encrypted, x-amz-meta-x-fula-encryption, x-amz-meta-x-fula-chunked, x-amz-meta-x-fula-forest, x-amz-meta-content-type' always;
535541
add_header 'Access-Control-Max-Age' '3600' always;
536542
537543
proxy_pass http://fula_gateway;

0 commit comments

Comments
 (0)