概要

Omeka SのIIIF Serverモジュールを使ってIIIFマニフェストを配信した際、外部のビューア等で以下のCORSエラーが発生しました。

Accesstofetchat'https://xxx/iiif/2/09fd29d5-8497-4def-a64d-ca104284f90d/manifest'fromorigin'https://universalviewer.io'hasbeenblockedbyCORSpolicy:No'Access-Control-Allow-Origin'headerispresentontherequestedresource.Ifanopaqueresponseservesyourneeds,settherequest'smodeto'no-cors'tofetchtheresourcewithCORSdisabled.

本記事では、Omeka SでのCORSエラーへの対策について紹介します。

対策

https://github.com/Daniel-KM/Omeka-S-module-IiifServer?tab=readme-ov-file#cors-cross-origin-resource-sharing

以下を追加しました。

SHHHeeeetFaaaEidddnleeeverrrsAMsssPaeeePttttLcIIIIhfffC>EEEAmmmTpppItttOyyyN_AAAEcccNcccVeeesss"sssp---rCCCoooodnnnutttcrrrtoooilllo---nAAA"llllllooowww---OHMreeiatgdhieonrdss"*"""oGrEiTg,inP,OSxT-"requested-with,content-type"

これにより、CORSの問題を解決することができました。

まとめ

Omeka SのIIIF Serverモジュールなどの利用にあたり、参考になりましたら幸いです。