简体   繁体   English

我在Chrome中收到400错误的印前检查要求,并且遇到了错误。 Angular + Azure函数

[英]I am getting and error in chrome as 400 bad request for preflight. Angular + Azure Functions

I am using Azure Functions to host apis and Angular as front end. 我正在使用Azure Functions托管api和Angular作为前端。 I am facing issues with Chrome PreFlight [OPTIONS] request which gets 400 Bad request Error. 我遇到与Chrome PreFlight [OPTIONS]请求有关的问题,该请求出现400错误的请求错误。

Chome中的Request的屏幕截图

It works on my Dev Machine. 它可以在我的Dev Machine上运行。 I do not see any pre flight errors. 我没有看到任何飞行前错误。

You need to go to Platform Features tab -> Click on CORS and add your FrontEnd URL to the list of Allowed Origins. 您需要转到“平台功能”选项卡->单击“ CORS”,然后将FrontEnd URL添加到“允许的来源”列表中。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Angular:我不断收到错误 400:使用 httpPost 时出现错误请求“发生一个或多个验证错误” - Angular: I keep on getting error 400: bad request "One or more validation error occured" when using httpPost 安装Angular CLI时出现错误400错误请求 - Getting error 400 Bad Request when installing Angular CLI 在Angular 5 POST调用中获取400 Bad Request错误代码 - Getting a 400 Bad Request error code in Angular 5 POST Call 没有可用消息 - 400 Bad request error getting while Angular API - No Message available - 400 Bad request error getting while Angular API 在Angular 5中使用400错误请求获取JSON响应 - Getting JSON response with 400 bad request in Angular 5 获取 POST :400 角度错误的请求 - Getting POST : 400 Bad request in angular Angular CORS 预检请求导致 400 Bad Request,但 Postman 请求工作正常 - Angular CORS preflight request causes 400 Bad Request, but Postman request works OK Angular 中的关系(错误 400 - 错误请求) - Relations in Angular (Error 400 - Bad Request) 错误400错误请求Angular 5使用令牌登录 - error 400 bad request Angular 5 login with token Angular 2:如何处理预检响应具有无效的HTTP状态代码400。错误的请求 - Angular 2: how to deal with Response for preflight has invalid HTTP status code 400. Bad request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM