[www] + Config model; config updated; using remote config; server refactoring
This commit is contained in:
1 parent
18a0b36a09
commit
5ad321ec0e
7 files changed
+85
-69
No files matched your search
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @param redirectionTable
|
||||
* [{String url, String redirect}, ...]
|
||||
* @returns {*}
|
||||
*/
|
||||
export function redirect(redirectionTable) {
|
||||
return function *(next) {
|
||||
let path = this.request.path;
|
||||
|
||||
let record = redirectionTable.find(i => i.url === path);
|
||||
if(record){
|
||||
this.redirect(record.redirect);
|
||||
return;
|
||||
}
|
||||
|
||||
yield next;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user