2

I want to know if there is a way to Set the Http.Header in actionHero.js: in our server we are working with actionHero.js and Go. I need to send on the "Header" two domain name "client domain & mine(actionHero Service)" to the Go service. or if there is any other way to do it on the Proxy server

thank you in advance

John Weldon
  • 39,849
  • 11
  • 94
  • 127
abdel
  • 665
  • 1
  • 11
  • 25

1 Answers1

4

assuming you mean the response header to the client, in your actions or initializers you can do:

data.connection.rawConnection.responseHeaders.push(['x-my-header', 'abc123'])

If you want to set persistent headers that the server responds to all requests with, you can set those in api.config.servers.web.httpHeaders

Evan
  • 3,191
  • 4
  • 29
  • 25