mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
No auth for author images
This commit is contained in:
parent
3bc2941445
commit
bf8407274e
@ -18,7 +18,7 @@ class Auth {
|
||||
constructor() {
|
||||
// Map of openId sessions indexed by oauth2 state-variable
|
||||
this.openIdAuthSession = new Map()
|
||||
this.ignorePattern = /\/api\/items\/[^/]+\/cover/
|
||||
this.ignorePatterns = [/\/api\/items\/[^/]+\/cover/, /\/api\/authors\/[^/]+\/image/]
|
||||
}
|
||||
|
||||
/**
|
||||
@ -28,7 +28,7 @@ class Auth {
|
||||
* @private
|
||||
*/
|
||||
authNotNeeded(req) {
|
||||
return req.method === 'GET' && this.ignorePattern.test(req.originalUrl)
|
||||
return req.method === 'GET' && this.ignorePatterns.some((pattern) => pattern.test(req.originalUrl))
|
||||
}
|
||||
|
||||
ifAuthNeeded(middleware) {
|
||||
|
Loading…
Reference in New Issue
Block a user