You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the Parse Server option directAccess: true, the request object in triggers have no IP address set.
This could be considered a characteristic of the direct access feature, but there are a few test cases that expect the IP address to be set, so it should probably be considered a bug.
All these tests pass, only because the test suite does not actually use the ParseServerRESTController because the test helper always sets the normal REST controller:
🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
New Issue Checklist
Issue Description
When setting the Parse Server option
directAccess: true
, the request object in triggers have no IP address set.This could be considered a characteristic of the direct access feature, but there are a few test cases that expect the IP address to be set, so it should probably be considered a bug.
parse-server/spec/CloudCode.spec.js
Lines 2006 to 2015 in 4b3ce20
parse-server/spec/CloudCode.spec.js
Lines 2083 to 2091 in 4b3ce20
parse-server/spec/CloudCode.spec.js
Lines 2468 to 2483 in 4b3ce20
All these tests pass, only because the test suite does not actually use the ParseServerRESTController because the test helper always sets the normal REST controller:
parse-server/spec/helper.js
Line 169 in 4b3ce20
See #8808 for context about this override.
Steps to reproduce
directAccess: true
.request
object inParse.Cloud.beforeSave('_User', async request => { ... });
has the propertyrequest.ip
set toundefined
.Actual Outcome
request.ip
set toundefined
Expected Outcome
request.ip
set to localhost, e.g.127.0.0.1
in IPv4 environments or::1
in IPv6 environments.Possibly just set the IP with a simple:
Environment
Server
6.3.1
The text was updated successfully, but these errors were encountered: