v12 (#5712)
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com> Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
This commit is contained in:
parent
a5955c1123
commit
f6154dc0af
871 changed files with 26140 additions and 71950 deletions
11
src/client/scripts/get-static-image-url.ts
Normal file
11
src/client/scripts/get-static-image-url.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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'
|
||||
})}`;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue