File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ export function app() {
244244 if ( referer && ! referer . startsWith ( '/' ) ) {
245245 try {
246246 const origin = new URL ( referer ) . origin ;
247- if ( isIiifAllowedOrigin ( origin ) ) {
247+ if ( IIIF_ALLOWED_ORIGINS . includes ( origin ) ) {
248248 console . info ( 'Found allowed origin, setting headers for IIIF viewer' ) ;
249249 // CORS header
250250 res . setHeader ( 'Access-Control-Allow-Origin' , origin ) ;
@@ -704,12 +704,6 @@ function healthCheck(req, res) {
704704 } ) ;
705705}
706706
707- /*
708- * Helper to determine if the origin is allowed
709- */
710- function isIiifAllowedOrigin ( origin ) {
711- return origin === REST_BASE_URL . replace ( "/server" , "" ) || IIIF_ALLOWED_ORIGINS . includes ( origin ) ;
712- }
713707
714708// Webpack will replace 'require' with '__webpack_require__'
715709// '__non_webpack_require__' is a proxy to Node 'require'
You can’t perform that action at this time.
0 commit comments