title: How to enable cors origin allow in Webhdfs - HDFS - Hadoop - Origin http://localhost:4200 is not allowed by Access-Control-Allow-Origin
body: <p>When I try to access Webhdfs from my Angular 6 app I get the error shown below. It seems to me that I tried almost everything including changing settings in <code>core-site.xml</code> and <code>hdfs-site.xml</code> unfortunately without positive result. Obviously, most likely it is needed to configure Hadoop properly. Does anyone have an idea how can I solve this problem? </p>
  
  <pre><code>[Error] Origin http://localhost:4200 is not allowed by Access-Control-Allow-Origin.
  [Error] XMLHttpRequest cannot load http://192.168.0.16:9870/webhdfs/v1/user/myuser/myfile.csv?op=CREATE&amp;user.name=myuser&amp;createflag=&amp;createparent=true&amp;overwrite=false due to access control checks.
  [Error] Failed to load resource: Origin http://localhost:4200 is not allowed by Access-Control-Allow-Origin. (myfile.csv, line 0)
  </code></pre>