ServiceStack v4.0.24.0 Google OAuth on Azure not working with 502

After upgrading to ServiceStack to 4.0.24.0, I started getting this error below when trying to log in using Google OAuth.

enter image description here

The same thing works locally on my dev machine. Has something changed from version 4.0.21.0?

+4
source share
1 answer

, - , . , Azure Websites , HttpResult Authenticate OAuth2Provider.

: Azure. ServiceStack OAuth2Providers ( 4.0.24 4.0.40) , , else .

, Content-Length, HttpResult. , , IIS AWS.

, , .

- Azure, , , IIS (, Web Installer ), , , .

( ) GlobalResponseFilter Content-Length GoogleOAuth2Provider.

, Google OAuth. GlobalResponseFilter .

GlobalResponseFilters.Add((req, res, dto) =>
{
    if (!req.PathInfo.EndsWith("/auth/GoogleOAuth", true, CultureInfo.InvariantCulture))
    {
        return;
    }
    HttpResult httpResult = dto as HttpResult;
    if (httpResult != null && httpResult.Headers.ContainsKey("Content-Length"))
    {
        httpResult.Headers.Remove("Content-Length");
    }
});

, - , Azure .

, .

+1

All Articles