소스 검색

nicer uuid

master
Roderic Day 4 년 전
부모
커밋
315552a68b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      pico.py

+ 1
- 1
pico.py 파일 보기

@@ -52,7 +52,7 @@ class PicoProtocol(websockets.WebSocketServerProtocol):

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

Loading…
취소
저장