Running label studio on https with nginx; error when connecting local storage

I use Label Studio on a server. To serve label studio on https I use nginx. The server has a hard drive on which the data is stored. The connection with local storage has worked, but I get the following error when I try to load the images in the labeling interface

The image does not appear to be available at https://ip_adress/data/local-files/?d=Image_Storage/compressed_image_12_2025-01-22.png, but when I manually change the URL to https://ip_adress/data/local-files/compressed_image_12_2025-01-22.png, the image loads.

How do I get the image to load correctly in my labeling interface?

version of Label Studio
Label Studio version: 1.16.0 installed by pip

labeling configuration.

<View className="image-container">
  <Image name="image" value="$image_url" zoom="true" zoomControl="true"/>
</View>

Nginx Configuration

server {

listen 443 ssl;
server_name ip_adress;

ssl_certificate /etc/ssl/certs/labelstudio.crt;
ssl_certificate_key /etc/ssl/private/labelstudio.key;

# Label Studio als Proxy weiterleiten
location / {
    proxy_pass http://127.0.0.1:xxxx;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

# Zugriff auf lokale Dateien für Label Studio erlauben
location /data/local-files/ {
    alias /DATA1_VOL_D/teresa.w/Image_Storage/;  #Path to images
    autoindex on;

    # CORS-Header 
    add_header 'Access-Control-Allow-Origin' '*';
    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
    add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
    add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';

    
    if ($request_method = 'OPTIONS') {
        add_header 'Access-Control-Allow-Origin' '*';
        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
        add_header 'Access-Control-Max-Age' 1728000;
        add_header 'Content-Type' 'text/plain; charset=utf-8';
        add_header 'Content-Length' 0;
        return 204;
    }
}

# Automatische Weiterleitung von HTTP auf HTTPS
server {
     listen 80;
     server_name ip_adress;
     return 301 https://$host$request_uri;
}