Skip to content

Commit

Permalink
use original status for redirect (#1548)
Browse files Browse the repository at this point in the history
Co-authored-by: Piyush Kapoor <[email protected]>
  • Loading branch information
pkapoor1989 and Piyush Kapoor authored Mar 6, 2020
1 parent 94e1a01 commit b8fe63a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/electrode-react-webapp/lib/hapi/plugin16.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DefaultHandleRoute = (request, reply, handler, content, routeOptions) => {
respond = reply(data);
} else if (HttpStatus.redirect[status]) {
respond = reply.redirect(data.path);
return respond;
return respond.code(status);
} else if (status >= 200 && status < 300) {
respond = reply(getDataHtml(data));
} else if (routeOptions.responseForBadStatus) {
Expand Down
2 changes: 1 addition & 1 deletion packages/electrode-react-webapp/lib/hapi/plugin17.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DefaultHandleRoute = (request, h, handler, content, routeOptions) => {
respond = h.response(data);
} else if (HttpStatus.redirect[status]) {
respond = h.redirect(data.path);
return respond;
return respond.code(status);
} else if (status >= 200 && status < 300) {
respond = h.response(getDataHtml(data));
} else if (routeOptions.responseForBadStatus) {
Expand Down

0 comments on commit b8fe63a

Please sign in to comment.