How to Enable CORS for Docker Apache httpd server? -
i need create apache server host files , them ajax. so, i'm using docker deploy server.
my docker image httpd:2.4.
i deployed server following command :
docker run -p 80:80 -dit --name file-server \ -v /sources/docker/apache-server/www/:/usr/local/apache2/htdocs/ httpd:2.4
but when want make request ajax, result:
xmlhttprequest cannot load http://server/kml/example.kml. no 'access-control-allow-origin' header present on requested resource. origin 'null' therefore not allowed access.
so, want follow next steps how enable cors apache httpd server? (step-by-step process). not know how add command in httpd.conf of component. , don't have httpd.conf template replace with:
v /sources/docker/apache-server/my-httpd.conf:/usr/local/apache2/conf/httpd.conf
please me question.
Comments
Post a Comment