0

I have two applications, the first one is Angular and will receive a get request with a value in the header request. This request will be sent by the second application (a chromiumwebbrowser inside windows forms, to use the angular component built-in). My question is, how can I get the value of a header property when my angular components is started? I know I can pass the values using a query parameter, in the url and get it using the routes, but I'm trying to use the headers to avoid security issues and don't expose the value.

Header property i need to get in angular

  • 1
    Can you show the part of code where "Angular [...] will receive a get request"... On which platform is this "Angular application" running? – hansmaad May 27 '21 at 15:40
  • https://stackoverflow.com/questions/51984914/how-to-get-request-header-value-when-accessing-my-angular-application may help – Nathan Beck May 27 '21 at 16:11
  • 1
    What you’re showing in the screenshot seems to be the browser requesting something from the server (with a GET). Usually an angular application running in the browser never receives requests. Everything is always initiated by the browser.. – MikeOne May 27 '21 at 16:12
  • Thank you for the explanation, MikeOne. I solved using an url query parameter, thank you so much. – Thierry P. Oliveira May 27 '21 at 18:41

1 Answers1

0

After the MikeOne explanation, I thinked about this, so I solved using a query parameter in the url and getting it using the routes.