generateUrl
returns insecure URL and subsequent chunk uploads fail
#635
Labels
generateUrl
returns insecure URL and subsequent chunk uploads fail
#635
Initial checklist
Steps to reproduce
I'm using @tus/server with next.js pages router.
I set up my api route:
pages/api/file/tus/[[...file]].ts
Everything works well if the file is less than the chunk size I specified in the
tus.Upload
from tus-js-client implementation. However, if that exceeds then @tus/server generates a new URL for subsequent chunk uploads using thegenerateUrl
function.For whatever reason, the
proto
value returnshttp
instead ofhttps
. This leads to an insecure URL and my application refuses to execute it, throwing CORS errors.I fixed it by modifying the return statement of
generateUrl
and hardcoding as
afterproto
.Expected behavior
proto should be https not http
Actual behavior
proto is http not https
The text was updated successfully, but these errors were encountered: