I am trying to add OPTIONS inside haproxy instead adding it in every rest api. I am using something like this:

 acl is_options method OPTIONS use_backend cors_backend if is_options backend cors_backend http-request return status 200 

In previous part of haproxy.cfg I added some CORS headers and everything works fine for api calls going to my rest api servers, but when I use cors_backend to send response directly from haproxy, all headers I added above are removed.

Is this expected, is there some way to preserve headers? Maybe it is not good idea to add OPTIONS to haproxy at all

Related questions 1 Calling Python from Stata 1 Python: Don't work StatsModels 2 pandas and Stata 13 files Related questions 1 Calling Python from Stata 1 Python: Don't work StatsModels 2 pandas and Stata 13 files 2 Run Stata from Python and assure that there was no errors 0 How can I fix this error that pops up when installing pystan via pip install? 1 Error trying to run pytest for the first time 41 ModuleNotFoundError: No module named 'pytest' 3 ImportError: No module named pandas when using pytest 10 import pystan._api failed:ImportError: DLL load failed: The specified module could not be found 2 How to install pydataset using conda command, or Jupyter notebook Load 7 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.