X-Git-Url: http://git.ieval.ro/?p=plack-app-gruntmaster.git;a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=7a3dc348b065037ae139a111b2494945a85eb747;hp=0666fad804a3329bf41ddade92c129b954c6a7ab;hb=2beb67b456221a9a56d4354f0f4a5c435f0c3a73;hpb=fd15256b2c8997bdda94c1ebadb15d86a280d9d4 diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 0666fad..7a3dc34 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -140,9 +140,7 @@ sub dispatch_request{ sub (/login) { forbid !remote_user; - - my $return = $env->{HTTP_REFERER} // '/'; - [303, ['Set-Cookie' => "username=".remote_user->id, Location => $return], []] + [200, ['Content-Type' => 'text/plain; charset=UTF-8', 'Cache-Control' => 'private, max-age=300', Vary => 'Authorization'], [$env->{REMOTE_USER}]] }, sub (/ct/:contest/log/st) { redirect "/st/$_{contest}" },