Site images cannot be editied in the panel

,

I have followed the template for Nginx hosting.

( Kirby meets Nginx | Kirby CMS )

Page images show as thumbs and in panel previews. But when i go to edit an image I get and image can’t be found error. This is a relatively new error. Editing images works locally on apache.

The only difference in file paths and server file paths is hash tags on each folder and file.

Tests :

The request to https://host.com/panel/pages/photography+art-reproduction-photography/files/chestern1412273.jpg failed

The panel view : src=“data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw ”srcset="https://host.com/media/pages/photography/art-reproduction-photography/f7adf0ac56-1756607829/chestern1412273-352x282-crop.jpg 352w … etc >
works.

And the live view works…

Difficult to debug.


    # assets, media
    location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv|avif)$ {
    add_header Access-Control-Allow-Origin "*";
    expires 260d;
    access_log off;
    }

Turns out this was the culprit. Will need another way to set headers on images.
Fixed!