You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, a number of HTTP routes / URL paths defined in r2-streamer-js invoke the setResponseCORS() utility function in order to populate HTTP responses with adequate CORS headers:
Currently, a number of HTTP routes / URL paths defined in
r2-streamer-js
invoke thesetResponseCORS()
utility function in order to populate HTTP responses with adequate CORS headers:r2-streamer-js/src/http/server.ts
Lines 259 to 271 in c1f3ac0
( https://github.com/readium/r2-streamer-js/blob/develop/src/http/server.ts#L259-L271 )
For example, for serving the ReadiumWebPublicationManifest (JSON):
r2-streamer-js/src/http/server-manifestjson.ts
Lines 344 to 345 in c1f3ac0
( https://github.com/readium/r2-streamer-js/blob/develop/src/http/server-manifestjson.ts#L344-L345 )
However, what about HTTP
options
for CORS? How is this useful? What are the use-cases?Code example:
...added to:
r2-streamer-js/src/http/server.ts
Lines 136 to 142 in c1f3ac0
( https://github.com/readium/r2-streamer-js/blob/develop/src/http/server.ts#L136-L142 )
...and:
Inspired from NYPL's customizations:
https://github.com/NYPL-Simplified/opds-web-client/blob/1600781c267e241e5deb4094007e50df79eb6236/packages/server/index.js#L73
( https://github.com/NYPL-Simplified/opds-web-client/blob/master/packages/server/index.js#L73 )
CC @aslagle
The text was updated successfully, but these errors were encountered: