File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed 
hadoop-ozone/s3gateway/src/main/resources/webapps/static Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 2121    < meta  charset ="utf-8 "> 
2222    < meta  http-equiv ="X-UA-Compatible " content ="IE=edge "> 
2323    < meta  name ="viewport " content ="width=device-width, initial-scale=1 "> 
24+     < meta  http-equiv ="Content-Security-Policy " content ="script-src 'self'; "> 
2425    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> 
2526    < meta  name ="description " content ="Apache Hadoop Ozone S3 gateway "> 
2627
@@ -68,12 +69,15 @@ <h1>S3 gateway</h1>
6869
6970    < p > For example with aws-cli:</ p > 
7071
71-     < pre > aws s3api --endpoint < script > document . write ( window . location . href . replace ( "static/" ,   "" ) ) </ script >  create-bucket --bucket=wordcount</ pre > 
72+     < pre > aws s3api --endpoint < span   id =" s3gurl " > </ span >  create-bucket --bucket=wordcount</ pre > 
7273
7374    < p > For more information, please check the < a  href ="docs "> documentation.</ a > 
7475    </ p > 
7576</ div > <!-- /.container --> 
7677
77- < script  src ="static/bootstrap-3.4.1/js/bootstrap.min.js "> </ script > 
78+ < script  src ="jquery-3.4.1.min.js "> </ script > 
79+ < script  src ="bootstrap-3.4.1/js/bootstrap.min.js "> </ script > 
80+ < script  src ="s3g.js "> </ script > 
81+ 
7882</ body > 
7983</ html > 
Original file line number Diff line number Diff line change 1+ /** 
2+  * Licensed to the Apache Software Foundation (ASF) under one 
3+  * or more contributor license agreements.  See the NOTICE file 
4+  * distributed with this work for additional information 
5+  * regarding copyright ownership.  The ASF licenses this file 
6+  * to you under the Apache License, Version 2.0 (the 
7+  * "License"); you may not use this file except in compliance 
8+  * with the License.  You may obtain a copy of the License at 
9+  * 
10+  *     http://www.apache.org/licenses/LICENSE-2.0 
11+  * 
12+  * Unless required by applicable law or agreed to in writing, software 
13+  * distributed under the License is distributed on an "AS IS" BASIS, 
14+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
15+  * See the License for the specific language governing permissions and 
16+  * limitations under the License. 
17+  */ 
18+ 
19+ window . onload  =  function  ( )  { 
20+     var  safeurl  =  window . location . protocol  +  "//"  +  window . location . host  +  window . location . pathname ; 
21+     safeurl  =  safeurl . replace ( "static/" ,  "" ) ; 
22+     document . getElementById ( 's3gurl' ) . innerHTML  =  safeurl ; 
23+ } ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments