mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat: use request host as default SSR domain (#19485)
fix: hostname and domain confusion chore: e2e test
This commit is contained in:
parent
db0415bbcc
commit
3c6e9e1191
4 changed files with 15 additions and 4 deletions
|
|
@ -117,6 +117,13 @@ describe('/shared-links', () => {
|
|||
const resp = await request(shareUrl).get(`/${linkWithAssets.key}`);
|
||||
expect(resp.status).toBe(200);
|
||||
expect(resp.header['content-type']).toContain('text/html');
|
||||
expect(resp.text).toContain(`<meta property="og:image" content="http://127.0.0.1:2285`);
|
||||
});
|
||||
|
||||
it('should fall back to my.immich.app og:image meta tag for shared asset if Host header is not present', async () => {
|
||||
const resp = await request(shareUrl).get(`/${linkWithAssets.key}`).set('Host', '');
|
||||
expect(resp.status).toBe(200);
|
||||
expect(resp.header['content-type']).toContain('text/html');
|
||||
expect(resp.text).toContain(`<meta property="og:image" content="https://my.immich.app`);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue