authInterrupts
يتيح لك خيار التكوين authInterrupts
استخدام واجهات برمجة التطبيقات forbidden
و unauthorized
في تطبيقك. بينما تعتبر هذه الوظائف تجريبية، يجب عليك تمكين خيار authInterrupts
في ملف next.config.js
الخاص بك لاستخدامها:
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
experimental: {
authInterrupts: true,
},
}
export default nextConfig
module.exports = {
experimental: {
authInterrupts: true,
},
}