• Help Desk reporting gives you real-time visibility into your support operation without the manual work. Ask our experts about which metrics matter most! AMA Dec 8-12.

    Ask us anything

Redirect using serverless function

Sapna1
Participant

Hello,

I work on api using serverless function, i face problem with redirect page after call this api.

Sapna1_0-1681466020920.png

 I want to redirect back url.

0 Upvotes
1 Accepted solution
Kevin-C
Solution
Recognized Expert | Partner
Recognized Expert | Partner

Hey @Sapna1 

You've got a few options here:

  1. handle the redirect based on the request response on the front-end
    1. i.e. ….then(resp => winow.location = `XXXX`)
  2. return a location header from you serverless function
    1. the exact syntax escapes me at the moment 

 

View solution in original post

1 Reply 1
Kevin-C
Solution
Recognized Expert | Partner
Recognized Expert | Partner

Hey @Sapna1 

You've got a few options here:

  1. handle the redirect based on the request response on the front-end
    1. i.e. ….then(resp => winow.location = `XXXX`)
  2. return a location header from you serverless function
    1. the exact syntax escapes me at the moment