-
-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The request in Parse.Object.saveAll() does not have a reverse proxy #1945
Comments
Thanks for opening this issue!
|
Could you please complete the issue template (I've re-added the headlines) and ensure that you follow the checklist at the top? |
I already fix it, and very sorry about didn't follow the issue template, cause this is the first time I try to send the issue. |
No worries, thanks for reporting the issue. The template just helps others to easier understand the issue. In the steps to reproduce you are first querying |
sorry, it was |
Could you please correct the code and make sure it's complete? |
I corrected it. Here are some additions, where my parse server is set on port :4000/parse on docker, so you can see above that I use an nginx as a reverse proxy to /api -> :4000/parse |
Could you post the line from ParseObject.js:3047:34? |
The error show up on the batchReturned ... this line
so as you can see, if my parseUrl is 'http://192.168.1.1/api' and I use a reverse proxy to make this url to redirect on the Parse Server (this is setup on the docker url: '192.168.1.1:4000/parse'), and I can see the request is sending to the url 'http://192.168.1.1/api' and then turn into the 'https://192.168.1.1:4000/parse', but the getServerUrlPath() didn't know I was trying to use reverse proxy skill, so for example:
Sorry for my english is not very good so please forgive me :( if i didn't explain clearly |
Thanks for providing more details, let's see if someone in the community has an idea... |
New Issue Checklist
Issue Description
I was wondering about the practical method behind Parse.Object.saveAll, If my Parse Server I want to redirect through Proxy
ex: 192.168.1.1/api -> 192.168.1.1:4000/parse then, here is the problem.
on the parse/lib/node/ParseObject.js line:2388
And here is the problem, After the above code, my input data format will be like this:
and then, as you can see the RESTController will send a axios POST for url -> 192.168.1.1/api/batch and then proxy server (nginx), will let the request send to the 192.168.1.1:4000/parse/batch, but in my requests body, the path only show it to /api/classes/{{className}}/{{objectId}}
, it wont through the nginx setting to let the redirect change to /parse/classes/{{className}}/{{objectId}}
Steps to reproduce
Actual Outcome
format : Parse Error: cannot route batch path: /api/classes/{{className}}/{{objectId}} { code: 111 }
real outcome: ParseError: cannot route batch path /api/classes/tests/6ab89f70-addf-11ed-b17e-f98dadf7fe5c at C:\Users.......\node_modules\parse\lib\node\ParseObject.js:3047:34 at processTicksAndRejections (node:internal/process/task_queues:96:5) { code: 111 },
.
.
.
Expected Outcome
Expected it can saveAll and the response won't fail
Environment
Nginx
Server
Database
Client
The text was updated successfully, but these errors were encountered: