Posts

Showing posts from May, 2021

Apache2 CORS issue and solution / 아파치2 CORS 이슈와 해결책

Recently, I got a CORS error in nodejs project when I tried to load a file from webdav server (hosted by apache2 of ubuntu 18.04).  So, I have learned that server configuration on CORS makes this done.  As I googled with keywords ‘cors apache2’ and found that apache2.conf setting on <Directory> tag make things work.  < Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted Header always set Access-Control- Allow -Origin " * " Header always set Access-Control- Allow -Headers " origin, content-type, cache-control, accept, authorization, if-match, destination, overwrite " Header always set Access-Control-Expose-Headers " ETag " Header always set Access-Control- Allow -Methods " GET, HEAD, POST, PUT, OPTIONS, MOVE, DELETE, COPY, LOCK, UNLOCK " Header always set Access-Control- Allow -Credentials " true " </ Directory > If you got some errors like headers then yo...