Skip to main content

authInterrupts

还没翻译译自英文(nextjs.org)本页 2 段都还没译

The authInterrupts configuration option allows you to use forbidden and unauthorized APIs in your application. While these functions are experimental, you must enable the authInterrupts option in your next.config.js file to use them:

next.config.ts
import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  experimental: {
    authInterrupts: true,
  },
}

export default nextConfig
next.config.js
module.exports = {
  experimental: {
    authInterrupts: true,
  },
}