0

Have the UI hosted on example.com and backend hosted on api.example.com In a specific OAuth scenario api.example.com returns a 404 for this url

https://api.example.com/ng/login?error=access_denied&state=bQ9lk2#

I would like to handle this 404 in nginx and redirect it to

https://example.com/ng/login?error=access_denied&state=bQ9lk2# [without the api subdomain]

How do I do this preserving the query params

Anand Rockzz
  • 6,072
  • 5
  • 64
  • 71

1 Answers1

0

Never mind, it was easier to handle the redirect in app server itself. Left nginx alone.

Anand Rockzz
  • 6,072
  • 5
  • 64
  • 71