在 AWS Amplify 上部署 NextJS 应用程序
我的 CloudWatch 日志中出现不信任主机。
有人可以帮忙吗?
[下一个验证][错误][UNTRUST_HOST_ERROR]

网址: https: //master.dtzbr8sfj0q7k.amplifyapp.com/
我已将此域添加到我的 Cognito 允许的回调中。
包.json
"next": "13.0.7",
"next-auth": "^4.18.6",
Run Code Online (Sandbox Code Playgroud)
构建设置
version: 1
applications:
- frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
- COGNITO_CLIENT_ID=${COGNITO_CLIENT_ID}
- COGNITO_CLIENT_SECRET=${COGNITO_CLIENT_SECRET}
- COGNITO_DOMAIN=${COGNITO_DOMAIN}
- JWT_SECRET=${JWT_SECRET}
- NEXTAUTH_URL=${NEXTAUTH_URL}
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
appRoot: client
Run Code Online (Sandbox Code Playgroud)
/pages/api/[...nextauth].js
"next": "13.0.7",
"next-auth": "^4.18.6",
Run Code Online (Sandbox Code Playgroud)
/index.js
version: 1
applications:
- frontend:
phases:
preBuild:
commands:
- npm ci
build: …Run Code Online (Sandbox Code Playgroud) amazon-web-services amazon-cognito next.js aws-amplify next-auth