next-i18next 在匹配之前的翻译文件时使用 HEAD 请求方法,如果它仍然相同或仍然匹配
我的代码是这样的:
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { GetStaticPropsContext } from 'next'
export async function getStaticProps({ locale = 'en' }: GetStaticPropsContext) {
return {
props: {
...(await serverSideTranslations(locale, ['common'])),
},
}
}
当 next-i18next 匹配翻译文件时,如何禁用 HEAD 请求方法并使用 GET 请求代替?
因为显然,我们的服务器禁用了 HEAD 请求方法,所以我不能在我们的项目中使用 HEAD 请求方法