Hello All,
Is there a way to add a CORS header to httpd(8) responses for static
content?
Here is a summary of the issue:
Client request -> httpd Server1
Server1 response -> Client
Client jS xmlhttprequest for static content -> httpd Server2
Server2 response -> Client
CORS block, due to missing CORS header in Server2 response
I have not found a way to add the CORS header value for static content
from httpd(8). Am I missing something here?
To work around this, I have created CGI to add the header and return the
file contents. The CGI script does not add much value.
I believe relayd(8) could add the header. This solution would add a
layer of complexity that I prefer to avoid.
Both of these solutions add complexity that would be avoided entirely if
httpd(8) could be configured to add the CORS header.
I see three options:
1. Create a diff that adds a server CORS property to httpd.conf(5).
2. Create a diff that adds generic header NVPs to httpd.conf(5).
3. Create a local patch to hard code the header, along with existing
headers.
If there is not an existing solution, is there any interest in adding
the CORS header as a feature of httpd(8)?
Thanks,
--
David Rinehart
No comments:
Post a Comment