Fixes from the reference site: 404 page unlisted, own-origin media, fillGlobal defaults, switcher docs
- sitemap, llms.txt and the site index leave out the page assigned as the 404 page (unlistedPageIds, exported); it stays when it is also the homepage - buildImagesConfig: in production with R2_PUBLIC_URL empty, allow the site's own /api/media/file/** so next/image no longer answers 400 - fillGlobal: a choice field (select, radio, checkbox, number, date) still at its defaultValue counts as empty; text is never overwritten - docs: LanguageSwitcher renderLabel needs a 'use client' wrapper (i18n.md, ipal-site, ipal-setup, api.md) Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d992d131a2
commit
3645e61f7d
@@ -79,6 +79,14 @@ describe('buildImagesConfig', () => {
|
||||
expect(config.dangerouslyAllowLocalIP).toBe(true)
|
||||
expect(buildImagesConfig({ production: false, serverUrl: 'https://staging.acme.pl' }).dangerouslyAllowLocalIP).toBeUndefined()
|
||||
})
|
||||
|
||||
test('production without R2 (the documented default): the site\'s own media are allowed', () => {
|
||||
const config = buildImagesConfig({ production: true, publicUrl: '', serverUrl: 'https://acme.pl' })
|
||||
expect(config.remotePatterns).toEqual([{ hostname: 'acme.pl', pathname: '/api/media/file/**', protocol: 'https' }])
|
||||
expect(config.dangerouslyAllowLocalIP).toBeUndefined()
|
||||
// A local production build (CI, `next start` on localhost) still never opens private IPs.
|
||||
expect(buildImagesConfig({ production: true, serverUrl: 'http://localhost:3000' }).dangerouslyAllowLocalIP).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
describe('buildMediaPlaceholderHook', () => {
|
||||
|
||||
Reference in New Issue
Block a user