nelsontky / gh-pages-url-shortener

Minimal URL shortener that can be entirely hosted on GitHub pages.
https://ccb.wtf/1
GNU General Public License v3.0
1.34k stars 506 forks source link

Allow named short urls, only allow redirects for issues made by specific user, and preview redirect (based off amcwb) #112

Open river opened 1 year ago

river commented 1 year ago

Based off amcwb's PR. Loved his ideas but the code was not working for me, so I rewrote it in a way that seems to be working now.

  1. If user goes to https://domain/{TEXT} rather than https://domain/{NUMBER}, will redirect to an GH Issue that has {TEXT} as its description.
  2. If user goes to https://domain/{TEXT}? will display the URL to redirect to, without actually redirecting.
  3. Will not redirect of the GH Issue was not created by a specific user (specified at the config at the top).