Sign inSign up

kodumbeats/openai-api-proxy

By kodumbeats

Updated about 3 years ago

A small OpenAI API proxy for SPA local development in cookie-based auth environments.

Image
0

734

kodumbeats/openai-api-proxy repository overview

OpenAI API Proxy

An OpenAI API proxy useful for locally devloping a SPA.

Run

docker run \
    -p 3000:3000 \
    -e PORT=3000 \
    -e URL=https://some.example.com \
    -e ORIGIN=http://localhost:5173 \
    kodumbeats/openai-api-proxy:0.0.1

Config

The following environments are used:

  • ORIGIN: The CORS origin for the server. Must be exactly the local development address
  • URL: The OpenAI API base URL
  • PORT: Optional server port of proxy, defaults to 3000
  • JWT: Optional Authorization: bearer token used for requests, defaults to cookie auth passthrough

Tag summary

Content type

Image

Digest

sha256:84c4ec502

Size

83.1 MB

Last updated

about 3 years ago

docker pull kodumbeats/openai-api-proxy