qr{^https?://}
);
+our $PASTEMAXLEN = 1024*1024;
+
our %COOKIE_DEFAULTS = (
-httponly => undef,
-max_age => 3600
return undef unless defined $content;
$content =~ tr/\r//d;
$content =~ s/([^\n])\z/$1\n/;
+ length $content <= $PASTEMAXLEN or
+ fail "invalid paste content", ".badpaste";
return $content;
}