Github user chewbranca commented on the pull request:
https://github.com/apache/couchdb-chttpd/pull/101#issuecomment-190932361
Can we combine the `send_response/4` and `send_response_no_cors/4`
functions, or do we depend on any of the initial headers and/or the ordering in
which additional headers are added?
For instance:
```
send_cors_response(Req, Code, Headers0, Body) ->
Headers = chttpd_cors:headers(req, Headers0),
send_response(Req, Code, Headers, Body).
send_response(#httpd{mochi_req=MochiReq} = Req, Code, Headers0, Body) ->
%% send response as normal here without adding CORS headers
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---