minicomp / wax

Jekyll based framework for minimal exhibitions with IIIF 🐝
https://minicomp.github.io/wax/
MIT License
161 stars 84 forks source link

issue with custom domain name and github pages? // CORS block #178

Closed melaniewalsh closed 6 months ago

melaniewalsh commented 6 months ago

Hi all,

We recently changed the URL of our Wax site to a custom domain name — from https://apreus.github.io/paris-project-exhibition/ to https://www.paris-a-poem.com/. The GitHub pages URL (https://apreus.github.io/paris-project-exhibition/) will re-direct to the new domain name.

Most things are working with the new domain name, but images on individual pages (example here) are not showing up, and it appears they're being blocked based on the following error:

Screenshot 2024-03-14 at 1 26 05 PM

Access to XMLHttpRequest at 'https://apreus.github.io/paris-project-exhibition/img/derivatives/iiif/pci_1/manifest.json' 
from origin 'https://www.paris-a-poem.com' has been blocked by CORS policy: 
No 'Access-Control-Allow-Origin' header is present on the requested resource.

It seems like this issue stems from the fact that www.paris-a-poem.com is trying to grab images from https://apreus.github.io/?

Does anyone have suggestions about how to address this issue?

We tried to change the URL in the config.yml file to the new custom domain name, but then the entire website didn't work: https://github.com/apreus/paris-project-exhibition/blob/0e70089b7270754c3b8edd15d0c5bdcfe702533f/_config.yml#L23 And I don't know why that is. So any clarification about how to change the config.yml with custom domain names would be great, too. Thank you!

melaniewalsh commented 6 months ago

Update: We solved this issue! To work with our new custom domain name, we had to change the URL in the config.yml file to our custom domain URL, and we had to remove the "baseurl": https://github.com/apreus/paris-project-exhibition/blob/main/_config.yml#L23