View Issue Details

IDProjectCategoryView StatusLast Update
0009539New Feature Requests[All Projects] Generalpublic2017-06-18 20:54
Reporterharon4iggAssigned To 
Status newResolutionopen 
Summary0009539: [Request]: Add possibility to set response headers for HTTP exported functions

I tried to integrate my server with my website. Server provides different API methods, using HTTP export feature (e.g. <export function='foo' http='true'/>).

In order to call this methods using JavaScript, i need to return 'Access-Control-Allow-Origin' header with response. So i need to setup this headers somehow, during execution of exported method.

Looks like ipoHttpResponse->oResponseHeaders, should be editable from lua side.

TagsNo tags attached.



2017-01-28 22:34

viewer   ~~0025650

Have you considered running a HTTP proxy, such as haproxy or varnish in front of MTA server? Both of them allow you to manipulate requests and responses in real time.


2017-01-28 23:14

viewer   ~~0025652

hm, not yet, but will take a look on it! thank you for suggestion.


2017-01-29 00:22

viewer   ~~0025653

Here's a varnish 4 config that should get you going:

It forwards all requests to and adds Access-Control-Allow-Origin header to every response.

Issue History

Date Modified Username Field Change