Skip to content

Get request headers within Parse.Cloud.onLiveQueryEvent #6779

@maxiqsoft

Description

@maxiqsoft

I am trying to create a custom authorization within the header when accessing the LiveQueryServer, especially when connecting.

Within webhooks I can get the request headers like that

Parse.Cloud.beforeSave("Chat", function(request) {
	console.log( "header: ", request.headers );
});

To use custom headers, I added the header name to a constant named DEFAULT_ALLOWED_HEADERS within middleware.js and wrote on the client side this code: Parse.CoreManager.set('REQUEST_HEADERS', {"custom_token": "1234"});

It would be helpful if there would be a same way to access the request header within the Parse.Cloud.onLiveQueryEvent handler.
The current parameter are event, sessionToken, clients, client, subscriptions, error and I've already tried to change it manually within triggers.js and Parse.Cloud.js.

Edit: I've seen this issue, thats exactly what I need, but it seems like it wasnt commited - any clues why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions