4b6c113251
* Update string.ts * Refactor * Update string.ts * Update wrap-url.ts * Update string.ts * Update get-static-image-url.ts * Use querystring.stringify * Update outbox.ts * Back to the urlQuery * Update followers.ts * Update following.ts * Update outbox.ts * Update string.ts * Update get-static-image-url.ts * Update string.ts * Update string.ts * Separate prelude files
12 lines
398 B
TypeScript
12 lines
398 B
TypeScript
import { url as instanceUrl } from '../../config';
|
|
import * as url from '../../../../prelude/url';
|
|
|
|
export function getStaticImageUrl(baseUrl: string): string {
|
|
const u = new URL(baseUrl);
|
|
const dummy = `${u.host}${u.pathname}`; // 拡張子がないとキャッシュしてくれないCDNがあるので
|
|
return `${instanceUrl}/proxy/${dummy}?${url.query({
|
|
url: u.href,
|
|
static: '1'
|
|
})}`;
|
|
}
|