You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "EvanLiu2000 (via GitHub)" <gi...@apache.org> on 2026/04/19 04:29:37 UTC
Re: [PR] HDFS-17040. Namenode web UI should set content type to application/octet-stream when uploading a file. [hadoop]
EvanLiu2000 commented on PR #5721:
URL: https://github.com/apache/hadoop/pull/5721#issuecomment-4275168486
Core-sites.xml :
<property>
<name>hadoop.http.filter.initializers</name>
<value>org.apache.hadoop.security.HttpCrossOriginFilterInitializer</value>
</property>
<property>
<name>hadoop.http.cross-origin.enabled</name>
<value>true</value>
</property>
<property>
<name>hadoop.http.cross-origin.allowed-origins</name>
<value>*</value>
</property>
<property>
<name>hadoop.http.cross-origin.allowed-methods</name>
<value>GET,POST,HEAD,PUT,OPTIONS,DELETE</value>
</property>
<property>
<name>hadoop.http.cross-origin.allowed-headers</name>
<value>Origin,Accept,Content-Type,content-type,X-Requested-With,Authorization</value>
</property>
<property>
<name>hadoop.http.cross-origin.max-age</name>
<value>1800</value>
</property>
My Folder Permissions:
liuye@debian:~/hadoop/hadoop-3.5.0$ hadoop fs -ls -R /
drwxr-xr-x - dr.who supergroup 0 2026-04-19 12:21 /ad
When I attempted to upload a file to the `/ad` directory via the NameNode WebUI, an issue occurred:
Access to XMLHttpRequest at 'http://debian:9864/webhdfs/v1/ad/a.txt?op=CREATE&namenoderpcaddress=localhost:9000&createflag=&createparent=true&overwrite=false' from origin 'http://127.0.0.1:9870' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
May I ask how I should resolve this issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org