Auto-detect Cloudflare in installer

This commit is contained in:
Wruczek 2023-03-14 13:00:01 +01:00
parent 4ac20a09f7
commit 1f99a75d7a
1 changed files with 3 additions and 2 deletions

View File

@ -98,9 +98,10 @@ $displayip = Config::get("query_displayip"); // set initial website name to the
<div class="form-group mb-4"> <div class="form-group mb-4">
<div class="custom-control custom-checkbox"> <div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="using-cloudflare" name="using-cloudflare"> <input type="checkbox" class="custom-control-input" id="using-cloudflare" name="using-cloudflare"
<?= isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? "checked" : "" ?>>
<label class="custom-control-label" for="using-cloudflare"> <label class="custom-control-label" for="using-cloudflare">
I am using CloudFlare I am using Cloudflare
</label> </label>
</div> </div>
<p><small>This will change the way ts-website detects user IP address</small></p> <p><small>This will change the way ts-website detects user IP address</small></p>