Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14291

Non-wildcarded CORS settings do not work for GET requests

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.5.0
    • None
    • 0.25
    • Quasar
    • Puma Sprint 250

    Description

      When configuring CORS Response Headers using hst:responseheaders or hst:allowedorigins using specific URLs, e.g. using "https://my.app.com" rather than "*", see [1], this works for OPTIONS requests but not for GET requests.

      In the code in org.hippoecm.hst.core.container.CorsSupportValve#invoke, for GET, setAccessControlAllowOrigin is only called after isAllowedOriginResponseHeaderWildcard check.

      Using originAllowed instead can be the fix here.

      [1] https://documentation.bloomreach.com/14/library/concepts/page-model-api/configuration.html

      Attachments

        Activity

          People

            Unassigned Unassigned
            jhoffman Jeroen Hoffman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: