소스 검색

feat(webui): ensure assets are fetched from the OVPM HTTP server only

Previously we were fetching the necessary webui libraries such as bootstrap
and mui css, from the CDN for the sake of bandwidth and round-trip time.

But now we have decided to serve these assets from the OVPM server itself for
better integrity and protection against
information leaks such as IP address of the user agent to the 3rd party CDN
services.

Closes #65
Mustafa Arici 7 년 전
부모
커밋
34fe513f89

+ 7 - 7
bindata/bindata.go

@@ -93,7 +93,7 @@ func templateAuthSwaggerJson() (*asset, error) {
 		return nil, err
 	}
 
-	info := bindataFileInfo{name: "template/auth.swagger.json", size: 2854, mode: os.FileMode(420), modTime: time.Unix(1522842388, 0)}
+	info := bindataFileInfo{name: "template/auth.swagger.json", size: 2854, mode: os.FileMode(420), modTime: time.Unix(1522853267, 0)}
 	a := &asset{bytes: bytes, info: info}
 	return a, nil
 }
@@ -113,7 +113,7 @@ func templateBundleJs() (*asset, error) {
 		return nil, err
 	}
 
-	info := bindataFileInfo{name: "template/bundle.js", size: 559674, mode: os.FileMode(420), modTime: time.Unix(1522842400, 0)}
+	info := bindataFileInfo{name: "template/bundle.js", size: 559674, mode: os.FileMode(420), modTime: time.Unix(1522853280, 0)}
 	a := &asset{bytes: bytes, info: info}
 	return a, nil
 }
@@ -178,7 +178,7 @@ func templateDh4096PemTmpl() (*asset, error) {
 	return a, nil
 }
 
-var _templateIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x92\xcb\xae\xd3\x30\x10\x86\xf7\x79\x0a\x33\x6b\x12\x73\xa8\x90\x00\xd9\xd9\x70\xd9\xa1\x76\x51\x90\x58\xba\xf6\x40\xa6\xf8\x12\xd9\x93\xb4\x7d\x7b\x64\x07\xb5\x12\x48\x9c\x6c\x32\xb7\xff\xfb\x47\xb6\xd5\x8b\x8f\xfb\x0f\xc7\xef\x87\x4f\x62\xe2\xe0\xc7\x4e\xd5\x9f\xf0\x26\xfe\xd4\x80\x11\x6a\x01\x8d\x1b\x3b\x21\x54\x40\x36\xc2\x4e\x26\x17\x64\x0d\x5f\x8f\x9f\xfb\xb7\xd0\x1a\x4c\xec\x71\xdc\x7f\x3b\x7c\x51\x72\x8b\xef\xe3\xd1\x04\xd4\xb0\x12\x5e\xe6\x94\x19\x84\x4d\x91\x31\xb2\x86\x0b\x39\x9e\xb4\xc3\x95\x2c\xf6\x2d\x79\x29\x28\x12\x93\xf1\x7d\xb1\xc6\xa3\x7e\xda\xe0\x9e\xe2\x2f\x91\xd1\x6b\x28\x7c\xf3\x58\x26\x44\x06\xc1\xb7\x19\x35\x30\x5e\x59\xda\x52\x40\x4c\x19\x7f\x68\x98\x98\xe7\xf2\x5e\xca\x60\xae\xd6\xc5\xe1\x94\x12\x17\xce\x66\xae\x89\x4d\x41\xde\x0b\x72\x37\xec\x86\xa7\x2a\x7d\xd4\x86\x40\x71\xa8\xb0\x87\xed\x46\x95\xb2\xea\xc3\x42\xb6\x94\x86\x09\x0b\xf5\xaf\x86\x77\xc3\xeb\x37\x8d\x10\x16\xba\x6b\x9f\xdf\x54\x36\x7c\xb1\x99\x66\x16\x25\xdb\xff\xf3\xcf\x0f\xfc\xb9\xc0\xa8\xe4\x26\x1c\x3b\x25\xb7\x7b\x51\xa7\xe4\x6e\x0d\xe9\x68\x15\xd6\x9b\x52\x34\x54\x40\x3d\x69\x43\x11\x33\x8c\x5d\x27\xda\xd7\x46\xc8\x69\xc8\x29\x71\x85\x39\x5a\x5b\xf3\x4f\xf4\xf7\x5e\xa7\x25\x3a\x8f\xff\x18\x6f\x8e\x4a\x6e\x0f\xe6\x77\x00\x00\x00\xff\xff\xb8\x2a\x09\x7f\x41\x02\x00\x00")
+var _templateIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x91\x3f\x4f\xc3\x30\x10\xc5\xf7\x7c\x8a\xe3\x66\x52\x8b\x8d\xc1\xce\xc2\x9f\x0d\xb5\x43\x41\x62\x74\xed\x83\x5c\x71\xec\xc8\xbe\xa6\xf4\xdb\xa3\x38\xa8\x45\x30\xe0\xc5\xcf\x7e\xcf\xbf\x27\x9d\xf5\xd5\xfd\xfa\x6e\xfb\xba\x79\x80\x5e\x86\xd0\x35\x7a\xde\x20\xd8\xf8\x6e\x90\x22\xce\x17\x64\x7d\xd7\x00\xe8\x81\xc4\x82\xeb\x6d\x2e\x24\x06\x9f\xb7\x8f\xed\x2d\x56\x43\x58\x02\x75\xeb\x97\xcd\x93\x56\x8b\x3e\xc7\xa3\x1d\xc8\xe0\xc4\x74\x1c\x53\x16\x04\x97\xa2\x50\x14\x83\x47\xf6\xd2\x1b\x4f\x13\x3b\x6a\xeb\xe1\x1a\x38\xb2\xb0\x0d\x6d\x71\x36\x90\xb9\x59\xe0\x81\xe3\x07\x64\x0a\x06\x8b\x9c\x02\x95\x9e\x48\x10\xe4\x34\x92\x41\xa1\x4f\x51\xae\x14\x84\x3e\xd3\x9b\xc1\x59\xab\x5d\x4a\x52\x24\xdb\x71\x35\x70\x5c\xcd\xee\x85\xf3\x23\x36\x1c\xf8\x1c\xf8\x9f\xaf\x2a\xa3\xb8\xcc\xa3\x40\xc9\xce\xa0\xda\x5f\x18\xfb\x82\x9d\x56\x8b\xdb\x35\x5a\x2d\x23\xd3\xbb\xe4\x4f\xf5\x9d\xe7\x09\x5c\xb0\xa5\x18\x1c\x0e\xdc\xce\x43\xb0\x1c\x29\x63\xd7\x34\x50\x57\x8d\xb0\x37\x98\x53\x92\x19\xe6\x79\xaa\xe6\xb7\xfa\x5d\xbe\x3b\x44\x1f\xe8\x4f\xf1\xd2\xa8\xd5\xf2\x97\x5f\x01\x00\x00\xff\xff\x12\xc8\xdc\xf3\xdc\x01\x00\x00")
 
 func templateIndexHtmlBytes() ([]byte, error) {
 	return bindataRead(
@@ -193,7 +193,7 @@ func templateIndexHtml() (*asset, error) {
 		return nil, err
 	}
 
-	info := bindataFileInfo{name: "template/index.html", size: 577, mode: os.FileMode(420), modTime: time.Unix(1522842400, 0)}
+	info := bindataFileInfo{name: "template/index.html", size: 476, mode: os.FileMode(420), modTime: time.Unix(1522853280, 0)}
 	a := &asset{bytes: bytes, info: info}
 	return a, nil
 }
@@ -233,7 +233,7 @@ func templateNetworkSwaggerJson() (*asset, error) {
 		return nil, err
 	}
 
-	info := bindataFileInfo{name: "template/network.swagger.json", size: 6669, mode: os.FileMode(420), modTime: time.Unix(1522842388, 0)}
+	info := bindataFileInfo{name: "template/network.swagger.json", size: 6669, mode: os.FileMode(420), modTime: time.Unix(1522853267, 0)}
 	a := &asset{bytes: bytes, info: info}
 	return a, nil
 }
@@ -273,7 +273,7 @@ func templateUserSwaggerJson() (*asset, error) {
 		return nil, err
 	}
 
-	info := bindataFileInfo{name: "template/user.swagger.json", size: 6907, mode: os.FileMode(420), modTime: time.Unix(1522842388, 0)}
+	info := bindataFileInfo{name: "template/user.swagger.json", size: 6907, mode: os.FileMode(420), modTime: time.Unix(1522853267, 0)}
 	a := &asset{bytes: bytes, info: info}
 	return a, nil
 }
@@ -293,7 +293,7 @@ func templateVpnSwaggerJson() (*asset, error) {
 		return nil, err
 	}
 
-	info := bindataFileInfo{name: "template/vpn.swagger.json", size: 3732, mode: os.FileMode(420), modTime: time.Unix(1522842388, 0)}
+	info := bindataFileInfo{name: "template/vpn.swagger.json", size: 3732, mode: os.FileMode(420), modTime: time.Unix(1522853267, 0)}
 	a := &asset{bytes: bytes, info: info}
 	return a, nil
 }

+ 3 - 3
template/index.html

@@ -4,9 +4,9 @@
   <meta charset="UTF-8">
   <title>OVPM</title>
   <meta name="viewport" content="width=device-width, initial-scale=1">
-  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
-  <link href="//cdn.muicss.com/mui-0.9.25/css/mui.min.css" rel="stylesheet" type="text/css" />
-  <script src="//cdn.muicss.com/mui-0.9.25/js/mui.min.js"></script>
+  <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
+  <link href="/css/mui.min.css" rel="stylesheet" type="text/css" />
+  <script src="/js/mui.min.js"></script>
 </head>
 <body>
   <div class="mui-container">

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 4 - 0
webui/ovpm/public/css/bootstrap.min.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
webui/ovpm/public/css/mui.min.css


BIN
webui/ovpm/public/fonts/glyphicons-halflings-regular.woff


+ 3 - 3
webui/ovpm/public/index.html

@@ -4,9 +4,9 @@
   <meta charset="UTF-8">
   <title>OVPM</title>
   <meta name="viewport" content="width=device-width, initial-scale=1">
-  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
-  <link href="//cdn.muicss.com/mui-0.9.25/css/mui.min.css" rel="stylesheet" type="text/css" />
-  <script src="//cdn.muicss.com/mui-0.9.25/js/mui.min.js"></script>
+  <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
+  <link href="/css/mui.min.css" rel="stylesheet" type="text/css" />
+  <script src="/js/mui.min.js"></script>
 </head>
 <body>
   <div class="mui-container">

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
webui/ovpm/public/js/mui.min.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.