Closed
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
Currently, context
can only be used by injecting a _context
key/value into the body when using REST. This is problematic for SDK's that encode objects without modifying the body like the Swift SDK. This was originally discussed on community.parseplatform.org.
Feature / Enhancement Description
Currently, context
is setup to be accepted in the header, but doesn't have an actual header:
parse-server/src/middlewares.js
Lines 25 to 39 in 9ea355b
Adding a new header X-Parse-Cloud-Context
will address the issue.
Example Use Case
Using REST:
parse-server/spec/CloudCode.spec.js
Lines 2537 to 2548 in 0c23bfd
Alternatives / Workarounds
No workarounds for using context in the header. Will have to modify the body with _context
like the other SDKs.