fix: use optionalstyle in imgproxy#generateUrl
This commit is contained in:
parent
99dc69ee8f
commit
82397be39c
@ -26,10 +26,8 @@ export const imgProxySign = (target: string) =>
|
|||||||
return hmac.digest("base64url");
|
return hmac.digest("base64url");
|
||||||
};
|
};
|
||||||
|
|
||||||
export const generateUrl = (url: string, options?: string) =>
|
export const generateUrl = (url: string, options: string = "rs:auto:128:128:1/f:png") =>
|
||||||
{
|
{
|
||||||
if (!options) options = "rs:auto:128:128:1/f:png";
|
|
||||||
|
|
||||||
if (url.includes('https://proxy.cdn.alekswilc.dev/')) return url;
|
if (url.includes('https://proxy.cdn.alekswilc.dev/')) return url;
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "development")
|
if (process.env.NODE_ENV === "development")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user