paste.mozilla.org API endpoint returns URL with default base domain (dpaste.de)
Categories
(Websites :: paste.mozilla.org, defect)
Tracking
(Not tracked)
People
(Reporter: sheehan, Assigned: afrank)
References
Details
In bug 1574977 I've been reviving mach paste
for use with the new pastebin tool. I noticed that when querying the API, the returned URLs use the default dpaste.de
as the base URL, instead of paste.mozilla.org
. For example in my most recent post, the URL returned by the api is https://dpaste.de/93BwXE8h
instead of https://paste.mozilla.org/93BwXE8h
.
On this page in the documentation there is a mention of this problem - apparently the solution is to update the BASE_URL
property to the correct value (https://paste.mozilla.org/
).
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Sure thing, I can push that change out. Can you point me to the mach code so I can test the change (github username mozafrank)?
Reporter | ||
Comment 2•5 years ago
|
||
I'm still working on the mach code - the command was removed and referenced the old API endpoint. I'm rewriting for use with the new APIs.
You can test with curl
quite easily:
$ cat some_file.txt | curl -F 'format=url' -F 'content=<-' https://paste.mozilla.org/api/
https://dpaste.de/mmvmSeHT
Assignee | ||
Comment 3•5 years ago
|
||
Perfect, thanks! I used that syntax to successfully deploy and test the fix:
$ cat some_file.txt | curl -F 'format=url' -F 'content=<-' https://paste.mozilla.org/api/
https://paste.mozilla.org/UfPy1okg
Reporter | ||
Comment 4•5 years ago
|
||
Excellent - thanks for the quick turnaround, Adam!
Description
•