Browse Source

Added wsgi script

head_fix
sqozz 4 years ago
parent
commit
ae96b0c268
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      schort.py
  2. +4
    -0
      schort.wsgi

+ 1
- 1
schort.py View File

@@ -28,7 +28,7 @@ def short(shortLink=""):

def insertIdUnique(idToCheck, longUrl):
hashUrl = hashlib.sha256(longUrl.encode()).digest()
base64Url = base64.b64encode(hashUrl).decode()
base64Url = base64.urlsafe_b64encode(hashUrl).decode()
if len(idToCheck) == 0:
idToCheck = base64Url[:4]


+ 4
- 0
schort.wsgi View File

@@ -0,0 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import schort
application = schort.app.wsgi_app

Loading…
Cancel
Save