Relax sync.server.origin to allow paths #3423
Open
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.
Hi! How would you feel about relaxing the restriction that
sync.server.origin
must be protocol + domain (https://tcsync.example.com) and allow paths also (https://example.com/tcsync/)?This is useful for me since I run a bunch of services on a single server behind
nginx
:Previously I ran
taskd
on its dedicated port (53589) which meant I had to configure this ports to be open etc which was always a little worrying. Now with the advent oftaskchampion-sync-server
I can very almost run it behind port 80/443:with exception of this check. Just removing that was sufficient but I have beefed up the error handling a little and added some unittests while I was here.
I appreciate this is a little niche ...but running ones own
taskchampion-sync-server
instance is already fairly niche so maybe it won't so uncommon given the selection effect ;)Description
Previously sync.server.origin had to be a scheme + FQDN, for example: https://tcsync.example.com
After this we support paths in sync.server.origin, for example: https://example.com/tcsync/
If a path is present it must end with a slash.
This allows for taskchampion-sync-server run behind e.g. nginx on port 80 / 443 at the same time as other services. This is desirable since:
Also:
Additional information...
I changed C++ code or build infrastructure.
Please run the test suite and include the output of
cd build/test && make && ./problems
.I changed Rust code or build infrastructure.
Please run
cargo test
and address any failures before submitting.