Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 自訂字體與字體選項功能 #61

Merged
merged 6 commits into from
Oct 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: login @ no-cors mode
  • Loading branch information
lekoOwO authored Oct 6, 2024
commit a009dc22182344d50a028a763867a29def35315d
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,21 @@ sub_filter_once on;
並加入新的 location 塊:
```conf
location /ddplay-api/ {
proxy_pass https://api.dandanplay.net/;
proxy_pass https://api.dandanplay.net;
proxy_set_header Host $host;

# 下傳的頭部設置
add_header Access-Control-Allow-Origin "example.com";
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization";

if ($request_method = OPTIONS) {
add_header Content-Length 0;
add_header Content-Type text/plain;
return 204;
}
}

location /ddplay-api/api/v2/login {
rewrite ^/ddplay-api/api/v2/login(.*)$ /cors/https://api.dandanplay.net/api/v2/login$1 break;
proxy_pass https://jellyfin-danmaku.pages.dev;
proxy_pass https://ddplay-api.930524.xyz;
proxy_set_header Host $host;

# 下傳的頭部設置
add_header Access-Control-Allow-Origin "example.com";
add_header Access-Control-Allow-Methods "POST, OPTIONS";
add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization";
Expand Down Expand Up @@ -121,14 +118,16 @@ example.com {

handle_path /ddplay-api/* {
reverse_proxy https://api.dandanplay.net {
header_up Host {upstream_hostport}
header_down Access-Control-Allow-Origin "example.com"
header_down Access-Control-Allow-Methods "GET, POST, OPTIONS"
header_down Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization"
}
}
handle_path /ddplay-api/api/v2/login* {
rewrite * /cors/https://api.dandanplay.net{uri}
reverse_proxy https://jellyfin-danmaku.pages.dev {
rewrite * /cors/https://api.dandanplay.net/api/v2/login{http.request.uri.path}
reverse_proxy https://ddplay-api.930524.xyz {
header_up Host {upstream_hostport}
header_down Access-Control-Allow-Origin "example.com"
header_down Access-Control-Allow-Methods "POST, OPTIONS"
header_down Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization"
Expand Down