http->https

heyme·2023년 2월 22일

http->https solutions

시도해본 것들
1. response = requests.get('https://localhost', verify=False)
-> ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED]
-> ConnectionReFusedError: [Errno 111] Connection refused
등잔 밑이 어둡다더니, 처음 방법이 정답일 줄이야. 그런데 적용한 위치가 달랐던 거지. 역시 뭐든지 꼼꼼하게 봐야한다. 마음이 급하니 답을 두고도 이것저것 뒤적거리면서 멀리 돌아왔다. 그래도 그김에 네트워크 공부도 했다.
2. ssl._create_unverified_context()
3. cert.pem, key.pem file check
4. cert.pem, key.pem 검증 test
5. gradio lib 내부 파악, protocal/network 관련
-> usr/local/lib/python3.8/site-packages/gradio/block.py : 1410 line
-> requests.get(f"{self.local_url}startup-events")에서 verify=False 추가
내부에서 이뤄지는 동작이니 실행파일 밖이 아닌, gr.launch 안에서 관련 내용을 찾아 선언해야 한다!!

++ 더 공부할 내용
SSL, protocal, network layer

0개의 댓글