mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
build: fix selfhost config (#5930)
This commit is contained in:
@@ -21,12 +21,12 @@ class CustomAttachmentService extends AttachmentService {
|
||||
}
|
||||
|
||||
function customLoadFonts(service: PageService): void {
|
||||
const officialDomains = new Set(['affine.pro', 'affine.fail']);
|
||||
const officialDomains = new Set(['app.affine.pro', 'affine.fail']);
|
||||
if (!officialDomains.has(window.location.host)) {
|
||||
const fonts = CanvasTextFonts.map(font => ({
|
||||
...font,
|
||||
// self-hosted fonts are served from /assets
|
||||
url: '/assets' + new URL(font.url).pathname.split('/').pop(),
|
||||
url: '/assets/' + new URL(font.url).pathname.split('/').pop(),
|
||||
}));
|
||||
service.fontLoader.load(fonts);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user