-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
fix: fix upload URL and preview image on localhost #932
Conversation
Pull Request Test Coverage Report for Build 10978018022Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
I don’t understand why 127.0.0.1 needs to be changed to localhost. |
when I start up project on local, it will open browser forward address starts with localhost instead of 127.0.0.1. upload api and preview api starts with 127.0.0.1, it causes #917 and preview error. so I changed 127.0.0.1 to localhost |
It seems that this is a security self-origin configuration restriction of Next.js. I think it’s enough to set STORAGE_PREFIX to localhost |
OK, I will revert init_app's commit |
The changes related to file upload are also not necessary. We are using frontend direct upload, and it’s not mandatory to use the upload interface in our openapi. |
close #917
plus:
bug
preview after upload image or file:
fix:
I think it's a better way to assign
process.env.STORAGE_PREFIX
should be depend on env variable