Skip to content

Commit

Permalink
Allow in PubSub to add async custom headers
Browse files Browse the repository at this point in the history
Allow in PubSub the same capabilities as API for custom headers:
* Async header
* Override headers (Authorization)

Check issue #4928 for explanations.
  • Loading branch information
SebSchwartz authored Feb 17, 2020
1 parent 92c922e commit 5309c61
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ export class AWSAppSyncRealTimeProvider extends AbstractPubSubProvider {

const dataString = JSON.stringify(data);
const headerObj = {
...graphql_headers(),
...(await this._awsRealTimeHeaderBasedAuth({
apiKey,
appSyncGraphqlEndpoint,
Expand All @@ -250,6 +249,7 @@ export class AWSAppSyncRealTimeProvider extends AbstractPubSubProvider {
canonicalUri: '',
region,
})),
...(await graphql_headers()),
[USER_AGENT_HEADER]: Constants.userAgent,
};

Expand Down

0 comments on commit 5309c61

Please sign in to comment.