Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4227

CORS headers not present when retrieving Bitstream content

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Volunteer Needed (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: 7.0
    • Fix Version/s: None
    • Component/s: REST API v7
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      0
    • Documentation Status:
      Needed

      Description

      When attempting to display the content of a Bitstream on the webpage in Angular, there is a CORS error thrown because the GET request of a bitstream /content endpoint does not include the headers needed to support this. It does not have an ‘Access-Control-Allow-Origin’ header as demonstrated by the following error given through Angular.

      Access to XMLHttpRequest at 'https://dspace7-internal.atmire.com/rest/api/config/<<<some-bitstream>>>/content' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

       

      We should provide this header to the request response as otherwise we wouldn't be allowed to use any Bitstream content within a webpage in DSpace.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            raf.ponsaerts-atmire Raf Ponsaerts (Atmire)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: