Azure托管网站在隐身模式下运行良好,但在普通浏览器中无效 [英] Azure hosted site works well incognito mode but not in normal browser

查看:87
本文介绍了Azure托管网站在隐身模式下运行良好,但在普通浏览器中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我遇到一个问题,我们在Azure上托管的网站启用了Google身份验证无效/加载在普通浏览器上但在隐身模式下运行良好。以下是我们所面临的错误 

I am facing one issue where we have a site hosted on Azure with Google Authentication enabled does not work / load on normal browser but works well in incognito mode. Below is the error we face 

访问资源位于"https://accounts.google.com/o/oauth2/v2/ ?AUTH RESPONSE_TYPE =代码&安培; CLIENT_ID = 788183341030-htk2ipgs9ekkso8gpvrd4rst39klg7um.apps.googleusercontent.com&安培; REDIRECT_URI = HTTPS%3A%2F%2Fpatientcare.somatus.com%2F.auth%2Flogin%2Fgoogle%2Fcallback&安培;范围= +的OpenID轮廓+电子邮件&安培; state = redir%3D%252Fmanifest.json%26nonce%3D02d3faf3d1d5425781d72e4b79d75746_20190605152218'
(从'https://patientcare.somatus.com/manifest.json'重定向)来自原产地'https://patientcare.somatus.com'已被CORS政策阻止:请求的资源上没有"Access-Control-Allow-Origin"标题。

Access to resource at 'https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=788183341030-htk2ipgs9ekkso8gpvrd4rst39klg7um.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fpatientcare.somatus.com%2F.auth%2Flogin%2Fgoogle%2Fcallback&scope=openid+profile+email&state=redir%3D%252Fmanifest.json%26nonce%3D02d3faf3d1d5425781d72e4b79d75746_20190605152218' (redirected from 'https://patientcare.somatus.com/manifest.json') from origin 'https://patientcare.somatus.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

任何帮助都是赞成。

推荐答案

您好Shreesh_Tiwari,

Hi Shreesh_Tiwari,

正如您所说,您的网站在隐身模式下运行良好模式但不在普通浏览器中。 " CORS"是一种http功能,它使在一个域下运行的Web应用程序可以访问其他域中的资源。在您的情况下,"Access-Control-Allow-Origin"
标头不在请求的资源上。 

As you mentioned that your site runs well in incognito mode but not in normal browser. "CORS" is an http feature that enables a web application running under one domain to access resource in other domain. In your case "Access-Control-Allow-Origin" header is not present on the requested resource. 

您能否查看以下文档,在Azure应用服务中使用CORS托管其他api?

Could you please check the below documentation hosting rest api's with CORS in Azure app service

https://docs.microsoft.com / en-us / azure / app-service / app-service-web-tutorial-rest-api

我希望这有帮助。


这篇关于Azure托管网站在隐身模式下运行良好,但在普通浏览器中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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