mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
See: https://github.com/vercel/next.js/security/advisories/GHSA-mq59-m269-xvcx and [16.1.7](https://github.com/vercel/next.js/releases/tag/v16.1.7) --------- Co-authored-by: Sebastian "Sebbie" Silbermann <[email protected]>
30 lines
712 B
TypeScript
30 lines
712 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { check } from 'next-test-utils'
|
|
import { join } from 'path'
|
|
|
|
describe('app-dir action allowed origins', () => {
|
|
const { next, skipped } = nextTestSetup({
|
|
files: join(__dirname, 'safe-origins'),
|
|
skipDeployment: true,
|
|
dependencies: {
|
|
'server-only': 'latest',
|
|
},
|
|
// An arbitrary & random port.
|
|
forcedPort: 'random',
|
|
})
|
|
|
|
if (skipped) {
|
|
return
|
|
}
|
|
|
|
it('should pass if localhost is set as a safe origin', async function () {
|
|
const browser = await next.browser('/')
|
|
|
|
await browser.elementByCss('button').click()
|
|
|
|
await check(async () => {
|
|
return await browser.elementByCss('#res').text()
|
|
}, 'hi')
|
|
})
|
|
})
|