hr2/hr2.pl

39 lines
691 B
Perl
Executable File

#!/usr/bin/env perl
# May 2025
# Jia Tan <JiaT75@gmail.com>
use v5.40;
use Mojolicious::Lite -signatures;
use Mojo::Util qw{b64_decode b64_encode
gunzip gzip
url_escape url_unescape};
get '/', sub ($c) { $c->redirect_to('create') };
get '/create', sub ($c) {
$c->render;
};
post '/create', sub ($c) {
# Process the input...
$c->render;
};
get '/--meta-refresh/*hyperlink', sub ($c) {
my $hyperlink = $c->param('hyperlink');
# Process input...
$c->redirect_to($hyperlink);
};
get '/*hyperlink', sub ($c) {
my $hyperlink = $c->param('hyperlink');
# Process input...
$c->redirect_to($hyperlink);
};
app->start;