Skip to content

Commit

Permalink
switch path/pattern in routing
Browse files Browse the repository at this point in the history
  • Loading branch information
killua-eu committed Sep 7, 2023
1 parent 58b7d04 commit 9916745
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions glued/Config/Nginx/conf.d/main.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ port_in_redirect off;
fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
fastcgi_connect_timeout 600;

proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
3 changes: 0 additions & 3 deletions glued/container.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,12 @@
}

$e = new Enforcer($s['casbin']['modelconf'], $adapter);

$e->addNamedMatchingFunc('g', 'keyMatch2', function (string $key1, string $key2) {
return BuiltinOperations::keyMatch2($key1, $key2);
});
$e->addNamedDomainMatchingFunc('g', 'keyMatch2', function (string $key1, string $key2) {
return BuiltinOperations::keyMatch2($key1, $key2);
});


return $e;
});

Expand Down
2 changes: 1 addition & 1 deletion glued/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
foreach ($settings['routes'] as $name => $leaf) {
if (isset($leaf['methods'])) {
foreach ($leaf['methods'] as $request => $method) {
$route = $app->$request($leaf['path'], $method);
$route = $app->$request($leaf['pattern'], $method);
$route = $route->setName($name);
}
}
Expand Down

0 comments on commit 9916745

Please sign in to comment.