Skip to content

Commit 0c23bfd

Browse files
committed
add header
1 parent 6e75987 commit 0c23bfd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ ___
134134
- Add NPM package-lock version check to CI (Manuel Trezza) [#7333](https://github.com/parse-community/parse-server/pull/7333)
135135
- Fix incorrect LiveQuery events triggered for multiple subscriptions on the same class with different events [#7341](https://github.com/parse-community/parse-server/pull/7341)
136136
- Fix select and excludeKey queries to properly accept JSON string arrays. Also allow nested fields in exclude (Corey Baker) [#7242](https://github.com/parse-community/parse-server/pull/7242)
137+
- Add context header X-Parse-Context (Corey Baker) [#7437](https://github.com/parse-community/parse-server/pull/7437)
137138

138139
___
139140
## 4.5.0

spec/CloudCode.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2546,7 +2546,7 @@ describe('afterFind hooks', () => {
25462546
foo: 'bar',
25472547
},
25482548
});
2549-
const result = await req;
2549+
await req;
25502550
expect(calledBefore).toBe(true);
25512551
expect(calledAfter).toBe(true);
25522552
});

src/middlewares.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const getMountForRequest = function (req) {
2424
// req.auth - the Auth for this request
2525
export function handleParseHeaders(req, res, next) {
2626
var mount = getMountForRequest(req);
27-
2827
var info = {
2928
appId: req.get('X-Parse-Application-Id'),
3029
sessionToken: req.get('X-Parse-Session-Token'),
@@ -35,7 +34,7 @@ export function handleParseHeaders(req, res, next) {
3534
dotNetKey: req.get('X-Parse-Windows-Key'),
3635
restAPIKey: req.get('X-Parse-REST-API-Key'),
3736
clientVersion: req.get('X-Parse-Client-Version'),
38-
context: {},
37+
context: req.get('X-Parse-Context') == null ? {} : JSON.parse(req.get('X-Parse-Context')),
3938
};
4039

4140
var basicAuth = httpAuth(req);

0 commit comments

Comments
 (0)