Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Parse/src/main/java/com/parse/ParsePlugins.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public ParseHttpResponse intercept(Chain chain) throws IOException {
ParseHttpRequest request = chain.getRequest();
ParseHttpRequest.Builder builder = new ParseHttpRequest.Builder(request)
.addHeader(ParseRESTCommand.HEADER_APPLICATION_ID, applicationId)
.addHeader(ParseRESTCommand.HEADER_CLIENT_KEY, clientKey)
.addHeader(ParseRESTCommand.HEADER_CLIENT_VERSION, Parse.externalVersionName())
.addHeader(
ParseRESTCommand.HEADER_APP_BUILD_VERSION,
Expand All @@ -112,6 +111,10 @@ public ParseHttpResponse intercept(Chain chain) throws IOException {
// NETWORK_EXECUTOR
builder.addHeader(ParseRESTCommand.HEADER_INSTALLATION_ID, installationId().get());
}
// client key can be null with self-hosted Parse Server
if (clientKey != null) {
builder.addHeader(ParseRESTCommand.HEADER_CLIENT_KEY, clientKey);
}
return chain.proceed(builder.build());
}
});
Expand Down