Commit 6d67cc6f authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Fix #848 raptor on master (#900)

* fix(frontend): parenthesis made it crash on some systems

It looks like in Ubuntus parenthesis were ignored but the
page was not rendered in Fedora.

Removing the parenthesis fixes #848

* fix(frontend): set quoted routes backwards compatible

This was the Mojo commit that changed () to <>

https://github.com/mojolicious/mojo/commit/dd09c15716a1f6eb5d1c2e27904983831cc5a5be#diff-2650135fc08c671d8b875d9b8480f498

Maybe in the future we use the new API but now we must comply
with Ubuntu 18.04 Mojo

fixes #848
parent 3a64fb07
......@@ -236,7 +236,7 @@ get '/anonymous/(#base_id).html' => sub {
return quick_start_domain($c,$base->id, $USER->name);
};
any '/admin/(#type)' => sub {
any '/admin/#type' => sub {
my $c = shift;
return admin($c) if $c->stash('type') eq 'machines'
......@@ -1958,6 +1958,13 @@ sub _new_anonymous_user {
return $name;
}
my $routes = app->routes->children;
for my $route (@$routes){
$route->pattern->quote_start('(');
$route->pattern->quote_end(')');
$route->pattern->parse($route->pattern->unparsed);
}
app->secrets($CONFIG_FRONT->{secrets}) if $CONFIG_FRONT->{secrets};
app->start;
__DATA__
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment