fix: corriger toutes les erreurs de lint restantes (263 -> 0)
This commit is contained in:
+10
-3
@@ -11,13 +11,20 @@ function buildRemotePatterns() {
|
||||
const [hostname, port] = entry.split(':')
|
||||
const isLocal = hostname === 'localhost' || hostname === '127.0.0.1'
|
||||
const pattern = {protocol: isLocal ? 'http' : 'https', hostname, pathname: '/uploads/**'}
|
||||
if (port) pattern.port = port
|
||||
if (port) {
|
||||
pattern.port = port
|
||||
}
|
||||
|
||||
return pattern
|
||||
})
|
||||
if (!raw.includes('localhost'))
|
||||
if (!raw.includes('localhost')) {
|
||||
patterns.push({protocol: 'http', hostname: 'localhost', port: '1337', pathname: '/uploads/**'})
|
||||
if (!raw.includes('127.0.0.1'))
|
||||
}
|
||||
|
||||
if (!raw.includes('127.0.0.1')) {
|
||||
patterns.push({protocol: 'http', hostname: '127.0.0.1', port: '1337', pathname: '/uploads/**'})
|
||||
}
|
||||
|
||||
return patterns
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user