Support BADGE_STYLE env

pull/287/head
Amio 2019-06-10 22:14:28 +08:00
rodzic 0dccaa70f4
commit a5dbf95094
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -47,7 +47,9 @@ export function badgenServe (handlers: BadgenServeHandlers): Function {
params.subject = decodeURIComponent(params.subject)
params.status = decodeURIComponent(params.status)
if (query.style === undefined && req.headers.host.startsWith('flat.')) {
if (query.style === undefined
&& process.env.BADGE_STYLE === 'flat'
|| req.headers.host.startsWith('flat.')) {
query.style = 'flat'
}