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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to