从传入的HTTP请求中检索数据-Angular 4 [英] Retrieve data from incoming HTTP request - Angular 4

查看:58
本文介绍了从传入的HTTP请求中检索数据-Angular 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从传入我的Web应用程序[Angular应用程序]的传入HTTP请求中检索 header 值,并将该应用程序中检索到的值用于其他外发请求.我的角度应用程序是通过IIS托管的.我尝试使用 HttpHeaders ,但是它只能针对传出请求进行配置.

I want to retrieve header values from the incoming HTTP Requests, which is coming to my Web App[angular application] and use the retrieved values in the application for other outgoing requests. My angular application is hosted via IIS. I tried using HttpHeaders but its only configurable for outgoing requests.

请让我知道它是否可能,如果不能,那么解决方法:)

Please let me know whether its possible or not , if not then what are the work around :)

推荐答案

首先,在浏览器中运行的角度应用程序负责发送请求,因为该应用程序是客户端,可以发出请求并接收对这些请求的响应

First of all, your angular application running in the browser is responsible to send the request, as that app is a client and makes requests and receives responses to those requests.

第二,正如您提到的那样,您正在从第三方获取应用程序的身份验证"尚不清楚.

Secondly, as you mentioned "you are getting authentication for your application from a third party" is unclear.

如果您可以提供有关客户端-服务器身份验证的详细设计信息,那么我们可以了解您到底要实现什么.以下是我的假设,

If you could provide the design of your client-server-authentication in a bit detail, so we could understand what exactly you are trying to achieve. Following is my assumption,

您的应用程序托管了启用了Windows身份验证的功能,并且在您访问该Web应用程序时,您的浏览器正在与凭据哈希进行协商.

Your application is hosted with windows authentication enabled, and upon your visit to the web app, your browser is negotiating with credential hash.

现在,您想从客户端的哈希中检索身份信息,这是不可能的.

Now you want to retrieve identity information from that hash at the client side, which is not possible.

但是您提出问题的方式是:不可能,没有解决方法"

But the way your question is put up, the answer is "Not possible and no work around"

这篇关于从传入的HTTP请求中检索数据-Angular 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆