Uploaded image for project: 'Hawkular Metrics'
  1. Hawkular Metrics
  2. HWKMETRICS-554

CORS validation should be applied on request

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: REST
    • Labels:
      None

      Description

      Currently, CORS validation takes place in response filtering, not in request. In consequence, payload is already written even when the validation fails.

      So an invalid Origin would trigger a 400 bad request error BUT will still send the response content.

      In the case of POST endpoints, the response headers doesn't contain CORS information (Access-Control-xxx). Not sure why - maybe because the response stream is already closed?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jotak Joel Takvorian
                Reporter:
                jotak Joel Takvorian
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: