Skip to content

Commit

Permalink
fix: show real instance url (misskey-dev#12273)
Browse files Browse the repository at this point in the history
* Update CHANGELOG.md

* fix: show real instance url

---------

Co-authored-by: tamaina <[email protected]>
Co-authored-by: syuilo <[email protected]>
Co-authored-by: atsuchan <[email protected]>
Co-authored-by: Masaya Suzuki <[email protected]>
Co-authored-by: Kagami Sascha Rosylight <[email protected]>
Co-authored-by: taiy <[email protected]>
Co-authored-by: xianon <[email protected]>
Co-authored-by: kabo2468 <[email protected]>
Co-authored-by: YS <[email protected]>
Co-authored-by: Khsmty <[email protected]>
Co-authored-by: Soni L <[email protected]>
Co-authored-by: mei23 <[email protected]>
Co-authored-by: daima3629 <[email protected]>
Co-authored-by: Windymelt <[email protected]>
Co-authored-by: Ebise Lutica <[email protected]>
Co-authored-by: nenohi <[email protected]>
Co-authored-by: Acid Chicken (硫酸鶏) <[email protected]>
Co-authored-by: rinsuki <[email protected]>
Co-authored-by: FineArchs <[email protected]>
  • Loading branch information
1 parent 879f2d2 commit e2cac3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/backend/src/server/web/ClientServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export class ClientServerService {
serverErrorImageUrl: meta.serverErrorImageUrl ?? 'https://xn--931a.moe/assets/error.jpg',
infoImageUrl: meta.infoImageUrl ?? 'https://xn--931a.moe/assets/info.jpg',
notFoundImageUrl: meta.notFoundImageUrl ?? 'https://xn--931a.moe/assets/not-found.jpg',
instanceUrl: this.config.url,
};
}

Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/server/web/views/base.pug
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ html
meta(name='theme-color' content= themeColor || '#86b300')
meta(name='theme-color-orig' content= themeColor || '#86b300')
meta(property='og:site_name' content= instanceName || 'Misskey')
meta(property='instance_url' content= instanceUrl)
meta(name='viewport' content='width=device-width, initial-scale=1')
link(rel='icon' href= icon || '/favicon.ico')
link(rel='apple-touch-icon' href= appleTouchIcon || '/apple-touch-icon.png')
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { miLocalStorage } from '@/local-storage.js';

const address = new URL(location.href);
const address = new URL(document.querySelector<HTMLMetaElement>('meta[property="instance_url"]')?.content || location.href);
const siteName = document.querySelector<HTMLMetaElement>('meta[property="og:site_name"]')?.content;

export const host = address.host;
Expand Down

0 comments on commit e2cac3d

Please sign in to comment.