Fixed issue with cvat running in HTTP mode behind a HTTPS reverse proxy #7313
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.
Issue: #7288
Motivation and context
Fixed the problem where TUS resumable upload feature does not work when CVAT is setup to run in HTTP only, but put behind a HTTPs proxy.
Scenario: Client --> HTTPS reverse proxy --> HTTP Cvat server
Originally, CVAT would return HTTP location for tus resumable, but since client is requesting CVAT through a HTTPS proxy, CVAT should also return a HTTPS location for TUS resumable.
The change allows CVAT to recognize that it's behind a HTTPS reverse proxy, and return the HTTP scheme accordingly. This
change also works if
Client --> HTTP reverse proxy --> HTTPS Cvat server
.This change is required because it makes CVAT easier to be hosted behind a reverse proxy.
How has this been tested?
I set up a public nginx proxy manager on https://dev.cvat.mycompany.com, and it proxies to http://192.168.1.123:8080 (my cvat machine). Features such as
import dataset
didn't work because it uses TUS Resumable, which was returning the wrong HTTP scheme. After the change, the feature works when the proxy server and cvat runs in different HTTP scheme.Checklist
If an item isn't applicable for some reason, then
explicitly strikethroughthe wholeline. If you don't do that, GitHub will show incorrect progress for the pull request.
If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
develop
branch- [ ] I have created a changelog fragment- [ ] I have updated the documentation accordingly- [ ] I have added tests to cover my changes- [ ] I have increased versions of npm packages if it is necessary(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.