X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=application%2Fapi%2FApiMiddleware.php;h=cc7af18e962427405335f2f8c506934c6129762f;hb=HEAD;hp=adc8b2666306d185f70fb0668fcefdf2b40b7d13;hpb=fd1ddad98df45bc3c18be7980c1cbe68ce6b219c;p=github%2Fshaarli%2FShaarli.git diff --git a/application/api/ApiMiddleware.php b/application/api/ApiMiddleware.php index adc8b266..cc7af18e 100644 --- a/application/api/ApiMiddleware.php +++ b/application/api/ApiMiddleware.php @@ -1,4 +1,5 @@ hasHeader('Authorization') + if ( + !$request->hasHeader('Authorization') && !isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION']) ) { throw new ApiAuthorizationException('JWT token not provided'); @@ -143,6 +145,7 @@ class ApiMiddleware { $linkDb = new BookmarkFileService( $conf, + $this->container->get('pluginManager'), $this->container->get('history'), new FlockMutex(fopen(SHAARLI_MUTEX_FILE, 'r'), 2), true