fix: 补齐 99543c9 遗漏的内容改动(该提交的 git add 因 pathspec 报错未生效)
上一个 refactor 提交只落到 main.py 的重命名,端口与路径的实际改动漏掉了,此提交补齐: - source/main.py: PIXIV_BACKEND 9088->9007, BILIBILI_BACKEND 19990->9006, port 9888->9008 - nginx/openapi.rrrosmontis.icu.conf: 3 处 proxy_pass -> 127.0.0.1:9008 - systemd/openapi.service: WorkingDirectory/ExecStart 同步为 source/
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# openapi.rrrosmontis.icu 统一入口(原 api/pixiv/apixiv.bu4.ren 合并)
|
# openapi.rrrosmontis.icu 统一入口(原 api/pixiv/apixiv.bu4.ren 合并)
|
||||||
# /pixiv/ /bilibili/ -> openapi 聚合层 127.0.0.1:9888 (main.py)
|
# /pixiv/ /bilibili/ -> openapi 聚合层 127.0.0.1:9008 (main.py)
|
||||||
# /img-master/ /img-original/ -> i.pximg.net 图片反代(原 apixiv.bu4.ren 逻辑,方案二)
|
# /img-master/ /img-original/ -> i.pximg.net 图片反代(原 apixiv.bu4.ren 逻辑,方案二)
|
||||||
# 2026-09-02 补 /img-original/:App API 原图 URL 为 /img-original/ 前缀,此前未配置导致 404
|
# 2026-09-02 补 /img-original/:App API 原图 URL 为 /img-original/ 前缀,此前未配置导致 404
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ server {
|
|||||||
|
|
||||||
# ---- pixiv(openapi 聚合层 /pixiv/get_image)----
|
# ---- pixiv(openapi 聚合层 /pixiv/get_image)----
|
||||||
location ^~ /pixiv/ {
|
location ^~ /pixiv/ {
|
||||||
proxy_pass http://127.0.0.1:9888;
|
proxy_pass http://127.0.0.1:9008;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Real-Port $remote_port;
|
proxy_set_header X-Real-Port $remote_port;
|
||||||
@@ -104,7 +104,7 @@ server {
|
|||||||
|
|
||||||
# ---- bilibili(openapi 聚合层 /bilibili/get_video)----
|
# ---- bilibili(openapi 聚合层 /bilibili/get_video)----
|
||||||
location ^~ /bilibili/ {
|
location ^~ /bilibili/ {
|
||||||
proxy_pass http://127.0.0.1:9888;
|
proxy_pass http://127.0.0.1:9008;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Real-Port $remote_port;
|
proxy_set_header X-Real-Port $remote_port;
|
||||||
@@ -121,9 +121,9 @@ server {
|
|||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---- 其余(根路径 / )→ 9888(main.py:跳转文章页)----
|
# ---- 其余(根路径 / )→ 9008(main.py:跳转文章页)----
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:9888;
|
proxy_pass http://127.0.0.1:9008;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Real-Port $remote_port;
|
proxy_set_header X-Real-Port $remote_port;
|
||||||
|
|||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
from aiohttp import web, ClientSession, ClientTimeout
|
from aiohttp import web, ClientSession, ClientTimeout
|
||||||
|
|
||||||
|
|
||||||
PIXIV_BACKEND = "http://127.0.0.1:9088"
|
PIXIV_BACKEND = "http://127.0.0.1:9007"
|
||||||
BILIBILI_BACKEND = "http://127.0.0.1:19990"
|
BILIBILI_BACKEND = "http://127.0.0.1:9006"
|
||||||
|
|
||||||
|
|
||||||
async def handle_pixiv(request):
|
async def handle_pixiv(request):
|
||||||
@@ -52,4 +52,4 @@ app.router.add_get("/pixiv/get_image", handle_pixiv)
|
|||||||
app.router.add_get("/bilibili/get_video", handle_bilibili)
|
app.router.add_get("/bilibili/get_video", handle_bilibili)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
web.run_app(app, host="127.0.0.1", port=9888)
|
web.run_app(app, host="127.0.0.1", port=9008)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ Wants=network-online.target
|
|||||||
[Service]
|
[Service]
|
||||||
Environment=PATH=/home/openapi/env/general/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
Environment=PATH=/home/openapi/env/general/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/home/openapi/source/openapi
|
WorkingDirectory=/home/openapi/source
|
||||||
ExecStart=/home/openapi/env/general/bin/python /home/openapi/source/openapi/main.py
|
ExecStart=/home/openapi/env/general/bin/python /home/openapi/source/main.py
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
StandardOutput=append:/var/log/openapi.log
|
StandardOutput=append:/var/log/openapi.log
|
||||||
|
|||||||
Reference in New Issue
Block a user