Header values from UI angular application is not reaching the API proxy

Not applicable

Hello All,

From a UI angular app we are trying to send a header named - "signature" with a value "fromHeader". this is not reaching the API proxy. But when the same is tried from the POSTMAN the header values is appearing in the TRACE.

NOTE : There is no CORS issue as those policies are handled. I could see the preflight is working.. Even the JSON payloads are also getting passed.

Can somebody guide.. Dont know is it UI issue because from POSTMAN it is working fine.

FROM POSTMAN :

5061-in-postman.png

FROM UI :

5062-in-ui.png

0 6 704
6 REPLIES 6

Not applicable

Even the "Authorization" header is also not reaching.

Not applicable

Hi @manikandanj Do you have the Access-Control-Request-Headers HTTP Request Header in your preflight?
A header is said to be a simple response header if the header field name is an ASCII case-insensitive match for one of the following:

  • Cache-Control
  • Content-Language
  • Content-Type
  • Expires
  • Last-Modified
  • Pragma

More info https://www.w3.org/TR/cors/#access-control-request-headers-request-header

Hi Maruti Chand,

My CORS policy is as follows : Do i need to add something more ?

5063-cors.jpg

Hi @Maruti Chand now i added those headers in allow-hearders as you have pointed out.

5085-cors.jpg

and i could see the response headers in chrome browser when the preflight for the CORS is happening.

5086-capture.jpg

But i think in our UI angular application they might be missing something to set in header so that still the header value of signature and authorization is still not reaching Apigee proxy.

If you have allow headers, you should be good. BTW you don't need allow-control-request headers in the response. Try removing them and also check if your app is really adding those headers. @manikandanj