build: add Cloudflare static export and deploy config
This commit is contained in:
@@ -195,7 +195,13 @@ describe('content schemas', () => {
|
||||
})).toThrow(/unrecognized/i);
|
||||
});
|
||||
|
||||
it('accepts only the fixed preview canonical URL and no production hostname', () => {
|
||||
it('accepts only the fixed preview canonical URL and approved production hostname', () => {
|
||||
expect(parseSiteConfig({
|
||||
environment: 'production', canonicalUrl: 'https://lucapislaru.ro/', buildId: 'production-1',
|
||||
}).canonicalUrl).toBe('https://lucapislaru.ro/');
|
||||
for (const canonicalUrl of ['http://lucapislaru.ro/', 'https://www.lucapislaru.ro/', 'https://lucapîslaru.ro/', 'https://lucapislaru.ro/path', 'https://lucapislaru.ro/?', 'https://lucapislaru.ro.evil.test/']) {
|
||||
expect(() => parseSiteConfig({ environment: 'production', canonicalUrl, buildId: 'production-1' })).toThrow();
|
||||
}
|
||||
expect(() => parseSiteConfig({
|
||||
environment: 'preview', canonicalUrl: 'https://portfolio.example.test/', buildId: 'preview-1',
|
||||
})).toThrow(/portfolio\.localhost/i);
|
||||
|
||||
Reference in New Issue
Block a user