mirror of
https://github.com/lanqian528/chat2api.git
synced 2026-06-13 21:02:46 +08:00
v1.5.2 fix chrome124 and cf-https
This commit is contained in:
parent
1e2a1423b1
commit
6022f37d69
2
.github/workflows/build_docker.yml
vendored
2
.github/workflows/build_docker.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
images: lanqian528/chat2api
|
||||
tags: |
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=raw,value=v1.5.1
|
||||
type=raw,value=v1.5.2
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
|
||||
@ -30,7 +30,6 @@ impersonate_list = [
|
||||
"chrome119",
|
||||
"chrome120",
|
||||
"chrome123",
|
||||
"chrome124",
|
||||
"edge99",
|
||||
"edge101",
|
||||
]
|
||||
|
||||
@ -70,9 +70,12 @@ async def chatgpt_reverse_proxy(request: Request, path: str):
|
||||
petrol = "https"
|
||||
else:
|
||||
petrol = "http"
|
||||
if "x-forwarded-proto" in request.headers:
|
||||
petrol = request.headers["x-forwarded-proto"]
|
||||
|
||||
params = dict(request.query_params)
|
||||
request_cookies = dict(request.cookies)
|
||||
|
||||
headers = {
|
||||
key: value for key, value in request.headers.items()
|
||||
if (key.lower() not in ["host", "origin", "referer", "user-agent",
|
||||
|
||||
@ -52,7 +52,7 @@ proxy_url_list = proxy_url.split(',') if proxy_url else []
|
||||
user_agents_list = ast.literal_eval(user_agents)
|
||||
|
||||
logger.info("-" * 60)
|
||||
logger.info("Chat2Api 1.5.1 | https://github.com/lanqian528/chat2api")
|
||||
logger.info("Chat2Api 1.5.2 | https://github.com/lanqian528/chat2api")
|
||||
logger.info("-" * 60)
|
||||
logger.info("Environment variables:")
|
||||
logger.info("API_PREFIX: " + str(api_prefix))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user