How to use res.redirect in a webtask?

38 Views Asked by At

I'm exporting an express app called eggman with webtask-tools.

My res.redirect('/walrus')ses don't work.

The url for my app is ….sandbox.auth0-extend.com/eggman/walrus, which means / will point to ….sandbox.auth0-extend.com/walrus instead of /eggman/walrus.

Is there an elegant way to set a basepath to all redirects?

1

There are 1 best solutions below

0
On

The hack is to use res.redirect('/<webtaskName>/path'.

I've sent a PR to address this at the library level but I don't expect them to implement it.