2

Basically I'm writing some code which does an internal webclient request, gets all the headers and then I want to add those headers to a Redirect() call via a controller.

Is there any way to do that?

Richard Ev
  • 52,939
  • 59
  • 191
  • 278
Jamie
  • 876
  • 1
  • 10
  • 28
  • Did you find out if this is possible? – Richard Ev Jun 11 '13 at 13:18
  • Unfortunately it's not for security reasons. :( – Jamie Jun 11 '13 at 13:19
  • Redirect means 302 status code. Do you mean that you want to add some custom headers to this response? It is on the target action that you are redirecting to that you probably want to add the headers, isn't it? – Darin Dimitrov Jun 11 '13 at 13:20
  • @DarinDimitrov - in my scenario I am doing a POST-REDIRECT-GET. The information I want to add as a custom header is known only to the POSTed action, but not the GET one. – Richard Ev Jun 11 '13 at 13:29
  • 2
    Then you are busted. Forget about it. The only thing you can hope is to add custom headers after the POST which is sending the 302 status code. You will have to change your architecture so that you perform the remote call in the target GET action. – Darin Dimitrov Jun 11 '13 at 13:31

1 Answers1

0

Unfortunately it's not possible for security reasons as specified above.

Jamie
  • 876
  • 1
  • 10
  • 28