mirror of
https://github.com/grocy/grocy.git
synced 2026-10-16 21:00:04 +02:00
Make API route detection independent of real URL path (fixes #2977)
This commit is contained in:
parent
d9889fd157
commit
020841117f
|
|
@ -54,4 +54,4 @@
|
|||
|
||||
### API
|
||||
|
||||
- xxx
|
||||
- Fixed that API Key Authentication did not work when running Grocy in a subdirectory
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ abstract class BaseAuthMiddleware extends BaseMiddleware
|
|||
|
||||
protected function IsApiRoute(Request $request): bool
|
||||
{
|
||||
return string_starts_with($request->getUri()->getPath(), '/api/');
|
||||
return string_starts_with(RouteContext::fromRequest($request)->getRoute()->getPattern(), '/api/');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user