Angular 4-IE,Firefox 400错误请求

时间:2018-07-20 00:52:39

标签: angular internet-explorer bad-request

我有一个angular 4应用程序,在Chrome中运行良好,但是IE和FF显示400错误的请求,当我比较IE和Chrome之间的http标头时,我看到IE,FF添加了其他标头。当我在Firefox中删除“ If-Modified-Since:0”标头并重新发送(通过FF开发人员工具)时,它返回200 OK。可能是这里的问题,以及为什么IE / Firefox失败而不是chrome失败了,这似乎是由于这些缓存头所致。

这是IE标头

GET {domain path}/assets/environments/environment.json HTTP/1.1
Referer: {host}/index.html
X-HttpWatch-RID: 45248-10892
Cache-Control: no-cache
Pragma: no-cache
If-Modified-Since: 0
Accept: application/json, text/plain, */*
Accept-Language: en-US
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: {host domain}
DNT: 1
Connection: Keep-Alive
Cookie: _ga=GA1.2.1512081247.1492526215; _rollup=GA1.2.973698029.1530531199; ASP.NET_SessionId=jj12nlqxiugx24xj33m34anf;

这里是Chrome标头(比IE少的数字)

GET {domain path}/assets/environments/environment.json HTTP/1.1
Host: {host domain}
Connection: keep-alive
Accept: application/json, text/plain, */*
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Referer: {host}/index.html
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: {value}

0 个答案:

没有答案