23 lines
739 B
Plaintext
23 lines
739 B
Plaintext
handle /e5b2a5e5-b41d-4715-9d50-d4a3b0c1a85f {
|
|
rewrite /e5b2a5e5-b41d-4715-9d50-d4a3b0c1a85f /v1
|
|
@cors {
|
|
method OPTIONS
|
|
}
|
|
header @cors {
|
|
Access-Control-Allow-Origin: "*"
|
|
Access-Control-Allow-Methods: "*"
|
|
Access-Control-Allow-Headers: "*"
|
|
}
|
|
@post {
|
|
method POST
|
|
}
|
|
reverse_proxy @post https://api.openai.com {
|
|
header_up -*
|
|
header_up User-Agent "Deno/1.31.2"
|
|
header_up Host {upstream_hostport}
|
|
header_up Authorization "Bearer sk-fUeEFERXoCS2MebUcCCiTqtRVYxlTHjiyZQwYVuAbrT3BlbkFJO_MwApIoV9MxB4v86eSN2NDhr7PckywQf8g5e0AfEA"
|
|
header_up Content-Type {http.request.header.content-type}
|
|
header_down Access-Control-Allow-Origin "*"
|
|
}
|
|
}
|