Uploaded image for project: 'apiman (API Management)'
  1. apiman (API Management)
  2. APIMAN-349

Occasional duplicate headers with WAR impl causing CORS errors

    XMLWordPrintable

Details

    • Hide

      Seems to occur randomly. Once it starts happening it continues for a while then stops. Not managed to pin down any specific trigger or remedy. Will update ticket if I figure anything out.

      Show
      Seems to occur randomly. Once it starts happening it continues for a while then stops. Not managed to pin down any specific trigger or remedy. Will update ticket if I figure anything out.

    Description

      This only happens occasionally, and I have no idea what causes it (it seems to go away eventually).

      I'm just developing locally (angular port), and the following headers are returned.

      Somehow a situation is triggered that the SimpleCorsFilter runs twice.

      Remote Address:127.0.0.1:8080
      Request URL:http://localhost:8080/apiman/organizations/members
      Request Method:GET
      Status Code:404 Not Found
      Response Headers
      view source
      Access-Control-Allow-Credentials:true
      Access-Control-Allow-Credentials:true
      Access-Control-Allow-Origin:http://localhost:2772
      Access-Control-Allow-Origin:http://localhost:2772
      Access-Control-Expose-Headers:X-Apiman-Error
      Access-Control-Expose-Headers:X-Apiman-Error
      Cache-Control:no-cache, no-store, must-revalidate
      Connection:keep-alive
      Content-Type:application/json
      Date:Sat, 28 Mar 2015 14:38:34 GMT
      Expires:Fri, 27 Mar 2015 14:38:34 GMT
      Pragma:no-cache
      Server:WildFly/8
      Transfer-Encoding:chunked
      X-Apiman-Error:true
      X-Powered-By:Undertow/1
      
      GET http://localhost:8080/apiman/organizations/members 
      org-new-member.html:1 XMLHttpRequest cannot load http://localhost:8080/apiman/organizations/members. The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:2772, http://localhost:2772', but only one is allowed. Origin 'http://localhost:2772' is therefore not allowed access.
      apiman-plugin.js:641 apiman [2:38:34 PM]>>  [object Object]
      angular.js:9866 GET http://localhost:8080/apiman/organizations 405 (Method Not Allowed)
      

      Attachments

        Activity

          People

            ryordan@redhat.com Rachel Yordán
            msavy_jira Marc Savy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: