Skip to content

Commit

Permalink
Merge pull request #36 from casyalex/main
Browse files Browse the repository at this point in the history
fix: cloudflare copy link end with /,might cause path doesn't match.
  • Loading branch information
haibbo authored Jun 1, 2023
2 parents 16093a7 + 179c6ba commit 5fd76b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cf-openai-azure-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ async function handleRequest(request) {
}

const url = new URL(request.url);
if (url.pathname.startsWith("//")) {
url.pathname = url.pathname.replace('/',"")
}
if (url.pathname === '/v1/chat/completions') {
var path="chat/completions"
} else if (url.pathname === '/v1/completions') {
Expand Down

0 comments on commit 5fd76b4

Please sign in to comment.