Roderic Day 4 anni fa
parent
commit
315552a68b
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      pico.py

+ 1
- 1
pico.py Vedi File



async def process_request(self, path, request_headers): async def process_request(self, path, request_headers):
if path == '/': if path == '/':
random_path = str(uuid.uuid4()).split('-')[1]
random_path = f'{uuid.uuid4()}'.replace('-', '')[:8]
return self.redirect_to(random_path) return self.redirect_to(random_path)
elif path.lower() != path: elif path.lower() != path:
return self.redirect_to(path.lower()[1:]) return self.redirect_to(path.lower()[1:])

Loading…
Annulla
Salva