We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leave the admin functionality disabled when oauth not provided, but enable an obfuscated route that enables admin in the session and redirects to /
Something like this code snippet:
unless ( $self->config->{oauth} ) { my $obfuscated = $self->config->{obfuscated} || $self->random(); $self->log->info("Obfuscated admin route is $obfuscated"); $r->get("/$obfuscated")->to(cb=>sub{shift->redirect_to('/')}); } sub random { my $self = shift; my $file = $self->home->rel_file('.obfuscated'); return slurp $file if -e $file; my $random = md5(rand()); spurt $file, $random; return $random; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Leave the admin functionality disabled when oauth not provided, but enable an obfuscated route that enables admin in the session and redirects to /
Something like this code snippet:
The text was updated successfully, but these errors were encountered: