-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumedtype:questionSupport or code-level questionSupport or code-level question
Description
My server is hosted on aws ec2 instance. I am using elastic load balancer. Load balancer is using https. I am using nginx to send all requests on https://mydomain/parse to http://127.0.0.1:1337/parse
when i used serverURL as https://mydomain/parse i was getting same problem as issue 411
"error": {
"code": 100,
"message": "XMLHttpRequest failed: \"Unable to connect to the Parse API\""
}
so i modified serverURL to https://localhost:1337/parse . Things started working. but when i save a file object the url in response i get is http://localhost:1337/parse/files/my-app-id/filename instead ofhttps://mydomain/parse/files/my-app-id/filename. hope it made myself clear. my code segments are given below.
parse server configuration:-
var api = new ParseServer({
....
serverURL: http://localhost:1337/parse,
publicServerURL: https://mydomain/parse,
....
});
file object:-
var file = new Parse.File('file-name.jpg', data);
file.save(function (response){
console.log(response.url); //gives http://localhost:1337/parse/files/my-app-id/filename
}); //instead of https://mydomain/parse/files/my-app-id/filename
Metadata
Metadata
Assignees
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumedtype:questionSupport or code-level questionSupport or code-level question