fix(storage): 优化图片存储加速与 Zeabur 部署#211
Open
ThaddeusJiang wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/storage/v1增加轻量 Phoenix pipeline,只做 session/current_user 权限检查,避免走完整 browser pipeline。X-Accel-Redirect交给 Nginx 内部路径返回图片文件,保留浏览器访问 URL 为/storage/v1/...。MIX_DEPS_PATH依赖路径导致的 Tailwind/heroicons setup 问题。Validation
mix formatmix compile --warnings-as-errors --no-listeners --ignore-module-conflictDATABASE_URL=postgres://postgres:postgres@localhost:20001/vmemo_test TYPESENSE_URL=http://localhost:20002 TYPESENSE_API_KEY=xyz mix test test/vmemo_web/controllers/file_controller_test.exsE2E_BASE_URL=http://localhost:4080 bun run e2e -- tests/photos-index-page.spec.ts tests/photo-upload-page.spec.ts tests/photo-detail-page.spec.ts --project=macbook-13sh -n rel/entrypoint.shdocker run --rm -v "$PWD/config/nginx/prod.conf:/etc/nginx/nginx.conf:ro" nginx:1.27.5-alpine nginx -tdocker run --rm -v "$PWD/config/nginx/dev.conf:/etc/nginx/nginx.conf:ro" nginx:1.27.5-alpine nginx -tPHX_PORT=4001andVMEMO_ENABLE_NGINX=trueNotes
/storage/v1/...访问图片;/storage/v1/_internal/...只作为 Nginx internal 路径,不对外访问。