feat: Add sld redirects
All checks were successful
Build Docker / Build Main Image (push) Successful in 39s
All checks were successful
Build Docker / Build Main Image (push) Successful in 39s
This commit is contained in:
parent
d0985a8c1f
commit
5b4d15a544
7
main.py
7
main.py
@ -52,6 +52,13 @@ def error(message):
|
|||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
|
# Check if domain is subdomain
|
||||||
|
if request.host.count('.') > 1:
|
||||||
|
# See if link exists
|
||||||
|
link = db.get_link(request.host.split('.')[0])
|
||||||
|
if link != False:
|
||||||
|
return redirect(link)
|
||||||
|
|
||||||
if 'linkr' in request.cookies:
|
if 'linkr' in request.cookies:
|
||||||
token = request.cookies['linkr']
|
token = request.cookies['linkr']
|
||||||
domain = account.get_user(token)
|
domain = account.get_user(token)
|
||||||
|
Loading…
Reference in New Issue
Block a user