Skip to content

Commit

Permalink
[ENG-1037] - changed removeFromPath to remove_from_path for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Phara0h committed Oct 28, 2019
1 parent c53401f commit 1f71307
Show file tree
Hide file tree
Showing 7 changed files with 467 additions and 560 deletions.
2 changes: 1 addition & 1 deletion include/database/index.js
Expand Up @@ -200,7 +200,7 @@ class Database {
anon.addRoute({
route: '/travelling/assets/*',
host: null,
removeFromPath: '/travelling/assets/',
remove_from_path: '/travelling/assets/',
method: 'GET',
});
anon.addRoute({
Expand Down
2 changes: 1 addition & 1 deletion include/database/models/group.js
Expand Up @@ -15,7 +15,7 @@ class Group extends Base(BaseModel, 'groups', {
{
name: String, //needs to be unqiue
method: String,
removeFromPath: String,
remove_from_path: String,
route: String,
host: String
}
Expand Down
4 changes: 2 additions & 2 deletions include/server/router.js
Expand Up @@ -123,8 +123,8 @@ class Router {
target: this.transformRoute(sessionUser, r, r.host || `${config.https ? 'https' : 'http'}://127.0.0.1:${config.port}`),
};

if (r.removeFromPath) {
req.raw.url = req.raw.url.replace(this.transformRoute(sessionUser, r, r.removeFromPath), '');
if (r.remove_from_path) {
req.raw.url = req.raw.url.replace(this.transformRoute(sessionUser, r, r.remove_from_path), '');
}

if (config.log.requests && authenticated) {
Expand Down
455 changes: 207 additions & 248 deletions postman/Travelling.postman_collection.json

Large diffs are not rendered by default.

0 comments on commit 1f71307

Please sign in to comment.