mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-02-12 19:22:45 +00:00
api: fix sync not working on android
This commit is contained in:
committed by
Abdullah Atta
parent
cfe2875a67
commit
7172510c9e
@@ -131,13 +131,9 @@ namespace Notesnook.API
|
||||
options.DiscoveryPolicy.RequireHttps = false;
|
||||
options.TokenRetriever = new Func<HttpRequest, string>(req =>
|
||||
{
|
||||
if (req.Path == "/hubs/sync/v2")
|
||||
{
|
||||
var fromQuery = TokenRetrieval.FromQueryString(); //needed for signalr and ws/wss conections to be authed via jwt
|
||||
return fromQuery(req);
|
||||
}
|
||||
var fromHeader = TokenRetrieval.FromAuthorizationHeader();
|
||||
return fromHeader(req);
|
||||
var fromQuery = TokenRetrieval.FromQueryString(); //needed for signalr and ws/wss conections to be authed via jwt
|
||||
return fromHeader(req) ?? fromQuery(req);
|
||||
});
|
||||
|
||||
options.Events.OnTokenValidated = (context) =>
|
||||
|
||||
Reference in New Issue
Block a user