hr2/hr2.pl
2025-05-15 15:49:29 -04:00

38 lines
680 B
Perl

#!/usr/bin/env perl
# May 2025
# Jia Tan <JiaT75@gmail.com>
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;