Explorar el Código

auto update script executed

Toby Chui hace 1 año
padre
commit
6dd5e9ea76
Se han modificado 4 ficheros con 33 adiciones y 5 borrados
  1. 1 1
      main.go
  2. 2 2
      reverseproxy.go
  3. 2 1
      web/components/rules.html
  4. 28 1
      web/snippet/basicAuthEditor.html

+ 1 - 1
main.go

@@ -44,7 +44,7 @@ var (
 	name        = "Zoraxy"
 	version     = "2.6.6"
 	nodeUUID    = "generic"
-	development = false //Set this to false to use embedded web fs
+	development = true //Set this to false to use embedded web fs
 	bootTime    = time.Now().Unix()
 
 	/*

+ 2 - 2
reverseproxy.go

@@ -644,7 +644,7 @@ func HandleIncomingPortSet(w http.ResponseWriter, r *http.Request) {
 
 	newIncomingPortInt, err := strconv.Atoi(newIncomingPort)
 	if err != nil {
-		utils.SendErrorResponse(w, "invalid incoming port given")
+		utils.SendErrorResponse(w, "Invalid incoming port given")
 		return
 	}
 
@@ -652,7 +652,7 @@ func HandleIncomingPortSet(w http.ResponseWriter, r *http.Request) {
 	if dynamicProxyRouter.Root == nil || dynamicProxyRouter.Root.Domain == "" {
 		//Check if proxy root is set before checking recursive listen
 		//Fixing issue #43
-		utils.SendErrorResponse(w, "Proxy root not set")
+		utils.SendErrorResponse(w, "Set Proxy Root before changing inbound port")
 		return
 	}
 

+ 2 - 1
web/components/rules.html

@@ -377,7 +377,8 @@
                 column.empty().append(`<div class="ui checkbox" style="margin-top: 0.4em;">
                     <input type="checkbox" class="RequireBasicAuth" ${checkstate}>
                     <label>Require Basic Auth</label>
-                </div> <button class="ui basic tiny button" style="margin-left: 0.4em;" onclick="editBasicAuthCredentials('${endpointType}','${uuid}');"><i class="ui blue lock icon"></i> Edit Credentials</button>`);
+                    </div>
+                    <button class="ui basic tiny button" style="margin-left: 0.4em; margin-top: 0.4em;" onclick="editBasicAuthCredentials('${endpointType}','${uuid}');"><i class="ui blue lock icon"></i> Edit Settings</button>`);
 
             }else if (datatype == 'action'){
                 column.empty().append(`

+ 28 - 1
web/snippet/basicAuthEditor.html

@@ -11,10 +11,12 @@
         <div class="ui container">
             <div class="ui header">
                 <div class="content">
-                    Basic Auth Credential
+                    Basic Auth Settings
                     <div class="sub header" id="epname"></div>
                 </div>
             </div>
+            <div class="ui divider"></div>
+            <h3 class="ui header">Basic Auth Credential</h3>
             <div class="scrolling content ui form">
                 <div id="inlineEditBasicAuthCredentials" class="field">
                     <p>Enter the username and password for allowing them to access this proxy endpoint</p>
@@ -49,6 +51,31 @@
                     </div>
                 </div>
             </div>
+            <div class="ui divider"></div>
+            <h3 class="ui header">No-Auth Paths</h3>
+            <div class="scrolling content ui form">
+                <p>Exclude specific paths from the basic auth interface. Useful if you are hosting services require remote API access.</p>
+                    <table class="ui very basic compacted unstackable celled table">
+                        <thead>
+                        <tr>
+                            <th>Username</th>
+                            <th>Password</th>
+                            <th>Remove</th>
+                        </tr></thead>
+                        <tbody id="inlineEditExclusionPaths">
+                        <tr>
+                            <td colspan="3"><i class="ui green circle check icon"></i> No Path Excluded</td>
+                        </tr>
+                        </tbody>
+                    </table>
+                    <div class="field">
+                        <input id="inlineEditExclusionPath" type="text" placeholder="/api" autocomplete="off">
+                    </div>
+                    <div class="field" >
+                        <button class="ui basic button" onclick="addCredentialsToEditingList();"><i class="blue add icon"></i> Add Credential</button>
+                    </div>
+            </div>
+
         </div>
         <script>
             let editingCredentials = [];