Skip to content

vik-patel/cf1-redirect-page-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Cloudflare worker for custom CF One Gateway redirect page

Custom CF One Gateway Redirect Page

  1. Create a new worker and upload the worker.js code
  2. Modify the link to the logo and message as needed, countdown time can also be set here:
     <img id="logo" src="https://vplabs.us/acme_corp_logo.png">
     <h1>You Are Accessing A</h1>
     <h1>Non-Sanctioned AI Tool</h1>
     <h1>Redirecting to ${escapeHtml(safeUrl)}</h1>
     <p>You will be automatically redirected in <span id="countdown" class="countdown">10</span> seconds</p>
    
  3. Place the following url link in you CF One Gateway redirect rule within the "Policy URL redirect" and add the ?targetUrl= with your custom redirect url, e.g.:
    https://<worker_name>.workers.dev/?targetUrl=https%3A%2F%2Fchatgpt.com
    

Gateway Redirect Settings

About

CF One Custom Gateway Redirect Page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published