Handle not found shorten URL
This commit is contained in:
parent
e44480ff21
commit
ff7ba342bc
@ -3,6 +3,9 @@ import { tall } from 'tall';
|
||||
|
||||
export default function (context) {
|
||||
return tall(process.env.SHORTENER_BASE+context.route.path).then(function(unshortenedUrl) {
|
||||
if(unshortenedUrl == process.env.SHORTENER_BASE) {
|
||||
return;
|
||||
}
|
||||
context.redirect(unshortenedUrl);
|
||||
});
|
||||
// context.redirect("https://nanao.moe");
|
||||
|
Loading…
Reference in New Issue
Block a user