Make auth callback URL relative to base API_URL#6938
Make auth callback URL relative to base API_URL#6938jake-low wants to merge 1 commit intohotosm:developfrom
Conversation
|
|
@suzit-10 can you please review this PR? |
|
Thank you @jake-low for raising this 🙏 Really appreciate you taking the time to look into this 🙌 |
|
Hi @suzit-10, thanks for reviewing this. I unfortunately don't have time to revisit this PR and modify or retest it. I believe it fixes a genuine bug, although it may not fix all occurrences of that bug since I was focused only on fixing the code introduced in #6933. Feel free to either merge this PR or close it at your discretion. |
|
Hi @jake-low, thanks for the update! I appreciate you taking the time to address this. I'll proceed with the required changes across the code and merge the PR. |
Remove hardcoded `/api/v2/` prefixes from backend URLs (follow-up to #6938)
|
This was superseded by #7046 which has been merged and released, so I'll close this one. |



What type of PR is this? (check all applicable)
Describe this PR
This is a tweak to the changes made in #6933. That PR works correctly AFAIK for tasks.hotosm.org's use case, but I discovered when backporting the fix to osmus/tasking-manager (which powers tasks.openstreetmap.us and tasks.teachosm.org) that it does not work if the backend is deployed to a nonstandard URL path.
This change makes the callback URL string a relative path (removing the hardcoded
/api/v2prefix). The appropriate prefix will then be prepended infetchLocalJSONAPI()when the string is converted to aURLobject. This prefix may be/api/v2or it may be another value depending on the configuration environment variables provided at runtime.This change is running in production on tasks.openstreetmap.us and tasks.teachosm.org already, so I am fairly confident that it works.