Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

阿里云OSS Please use virtual hosted style to access #182

Open
cdz-me opened this issue Feb 6, 2024 · 1 comment
Open

阿里云OSS Please use virtual hosted style to access #182

cdz-me opened this issue Feb 6, 2024 · 1 comment

Comments

@cdz-me
Copy link

cdz-me commented Feb 6, 2024

main分支
启动信息为:
docker run -d --network=bridge -p 4000:3000
--name notea
-e STORE_ACCESS_KEY=LTAI5xxx
-e STORE_SECRET_KEY=GhqDwDdXHxxx
-e STORE_BUCKET=xxx
-e STORE_END_POINT=http://oss-cn-nanjing.aliyuncs.com
-e STORE_REGION=oss-cn-nanjing
-e STORE_FORCE_PATH_STYLE=true
-e PASSWORD=notea
-e COOKIE_SECURE=false
cinwell/notea:main

错误日志:
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
{
name: 'SecondLevelDomainForbidden',
message: 'Please use virtual hosted style to access.',
status: 500,
stack: 'SecondLevelDomainForbidden: Please use virtual hosted style to access.\n' +
' at throwDefaultError (/app/node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js:8:22)\n' +
' at deserializeAws_restXmlPutObjectCommandError (/app/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js:5782:43)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
' at async /app/node_modules/@aws-sdk/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24\n' +
' at async /app/node_modules/@aws-sdk/middleware-signing/dist-cjs/middleware.js:13:20\n' +
' at async StandardRetryStrategy.retry (/app/node_modules/@aws-sdk/middleware-retry/dist-cjs/StandardRetryStrategy.js:51:46)\n' +
' at async /app/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/flexibleChecksumsMiddleware.js:56:20\n' +
' at async /app/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:6:22\n' +
' at async StoreS3.putObject (/app/.next/server/chunks/446.js:949:9)\n' +
' at async TreeStore.set (/app/.next/server/chunks/446.js:1061:9)'
}

经参考阿里云“https://help.aliyun.com/zh/oss/support/http-status-code-403”“https://help.aliyun.com/zh/oss/user-guide/oss-domain-names?spm=a2c4g.11186623.0.i4#section-sgf-k5v-tdb”有关“Please use virtual hosted style to access”,是不是私有bucket的签名信息需要更新?

@cdz-me
Copy link
Author

cdz-me commented Feb 6, 2024

已解决,对于阿里云OSS
1、STORE_END_POINT 必须https
2、删除 STORE_FORCE_PATH_STYLE=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant