Closed kvz closed 6 years ago
The only issue with endpoint
is that we use it in uploader plugins, and that might contribute to a popular misunderstanding that Uppy Server is an upload target. Not an end of the world, just noting.
That's a fair point. How about url
then?
serverUrl
and serverPattern
? 🤔
I like url
better. We never used serverHost
, so maybe no need for serverUrl
either.
on second thought, serverUrl and serverPattern tells it just right, and avoids any future confusion whatsoever. So I'll go with those instead https://github.com/transloadit/uppy/pull/905
For BC-compat, we could likely still accept host and throw a Deprecation warning at the console for a release or two.
@kvz do we really need to? Since we are still pre-1.0 and breaking changes are still permitted-ish?
That’s fair! I expect some people will upgrade and forget to change, so maybe we can just fail fast and hard when no serverUrl is set. Perhaps this is already the case (for host, currently). Then we can just rename, note Breaking in the changelog and be done with it 👌
Sent from mobile, pardon the brevity.
On 14 Jun 2018, at 04:08, Ifedapo .A. Olarewaju notifications@github.com wrote:
For BC-compat, we could likely still accept host and throw a Deprecation warning at the console for a release or two.
@kvz do we really need to? Since we are still pre-1.0 and breaking changes are still permitted-ish?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Host is usually:
jane.transloadit.com
but sincehost
in our case contains a full url with many more components (protocol, path, etc), I'd vote to name itendpoint
.hostPattern
could than be namedallowedOrigins
which could either take (an array for a list of flat origins, a function to be executed on a string which returns true or false, or) a RegExp.The proposals are up for discussion, but I do think a change is needed.
For BC-compat, we could likely still accept
host
and throw a Deprecation warning at the console for a release or two.