Skip to content

ParseFile.saveFile failed if javascriptKey is not set #569

Closed
@alvinthen

Description

@alvinthen

As state by parse-server's README, javascriptKey is no longer necessary but without setting it, using ParseFile will fail.

In this line, X-Parse-JavaScript-Key will be undefined, and when the xhr is finally sent, NodeJS will throw a ERR_HTTP_INVALID_HEADER_VALUE the line here

The easy fix should look like this

var jsKey = CoreManager.get('JAVASCRIPT_KEY');
if (jsKey) {
 headers[ 'X-Parse-JavaScript-Key'] = jsKey;
}

I'll be glad to send in a PR if the fix is as easy as above.

This is referencing to Parse SDK JS v1.11.1 and NodeJS v9.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions