|
@@ -33,6 +33,61 @@
|
|
|
<label>Proxy Target require TLS Connection <br><small>(i.e. Your proxy target starts with https://)</small></label>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- Advance configs -->
|
|
|
+ <div class="ui basic segment" style="background-color: #f7f7f7; border-radius: 1em;">
|
|
|
+ <div id="advanceProxyRules" class="ui fluid accordion">
|
|
|
+ <div class="title">
|
|
|
+ <i class="dropdown icon"></i>
|
|
|
+ Advance Settings
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <p></p>
|
|
|
+ <div class="field">
|
|
|
+ <div class="ui checkbox">
|
|
|
+ <input type="checkbox" id="skipTLSValidation">
|
|
|
+ <label>Ignore TLS/SSL Verification Error<br><small>E.g. self-signed, expired certificate (Not Recommended)</small></label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <div class="ui checkbox">
|
|
|
+ <input type="checkbox" id="requireBasicAuth">
|
|
|
+ <label>Require Basic Auth<br><small>Require client to login in order to view the page</small></label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="basicAuthCredentials" class="field">
|
|
|
+ <p>Enter the username and password for allowing them to access this proxy endpoint</p>
|
|
|
+ <table class="ui very basic celled table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Username</th>
|
|
|
+ <th>Password</th>
|
|
|
+ <th>Remove</th>
|
|
|
+ </tr></thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td colspan="3"><i class="ui green circle check icon"></i> No Entered Credential</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="three small fields credentialEntry">
|
|
|
+ <div class="field">
|
|
|
+ <input type="text" placeholder="Username" autocomplete="off">
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <input type="password" placeholder="Password" autocomplete="off">
|
|
|
+ </div>
|
|
|
+ <div class="field">
|
|
|
+ <button class="ui basic button"><i class="blue add icon"></i> Add Credential</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
<button class="ui basic button" onclick="newProxyEndpoint();"><i class="blue add icon"></i> Create Endpoint</button>
|
|
|
<br><br>
|
|
|
</div>
|
|
@@ -63,6 +118,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<script>
|
|
|
+ $("#advanceProxyRules").accordion();
|
|
|
+
|
|
|
//New Proxy Endpoint
|
|
|
function newProxyEndpoint(){
|
|
|
var type = $("#ptype").val();
|
|
@@ -152,6 +209,18 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
+ function toggleBasicAuth() {
|
|
|
+ var basicAuthDiv = document.getElementById('basicAuthOnly');
|
|
|
+ if ($("#requireBasicAuth").parent().checkbox("is checked")) {
|
|
|
+ $("#basicAuthCredentials").removeClass("disabled");
|
|
|
+ } else {
|
|
|
+ $("#basicAuthCredentials").addClass("disabled");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#requireBasicAuth").on('change', toggleBasicAuth);
|
|
|
+ toggleBasicAuth();
|
|
|
+
|
|
|
+
|
|
|
//Check if a string is a valid subdomain
|
|
|
function isSubdomainDomain(str) {
|
|
|
const regex = /^(localhost|[a-z0-9]+([\-.]{1}[a-z0-9]+)*\.[a-z]{2,}|[a-z0-9]+([\-.]{1}[a-z0-9]+)*\.[a-z]{2,}\.)$/i;
|