Skip to content

Commit

Permalink
Merge pull request #3777 from cloudfoundry-incubator/fix-register-que…
Browse files Browse the repository at this point in the history
…ry-string

Don't send registration info in query string
  • Loading branch information
richard-cox authored Aug 16, 2019
2 parents b033a5b + a5facc4 commit 07f0714
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/frontend/packages/store/src/effects/endpoint.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,20 @@ export class EndpointsEffect {
/* tslint:disable-next-line:no-string-literal */
paramsObj['sub_type'] = action.endpointSubType;
}
const params: HttpParams = new HttpParams({
fromObject: paramsObj
// Encode auth values in the body, not the query string
const body: any = new FormData();
Object.keys(paramsObj).forEach(key => {
body.set(key, paramsObj[key]);
});

return this.doEndpointAction(
apiAction,
'/pp/v1/register/' + action.endpointType,
params,
new HttpParams({}),
'create',
[REGISTER_ENDPOINTS_SUCCESS, REGISTER_ENDPOINTS_FAILED],
action.endpointType,
null,
body,
this.processRegisterError
);
}));
Expand Down

0 comments on commit 07f0714

Please sign in to comment.