Skip to content

Commit

Permalink
Merge pull request #77 from langchain-ai/nfcampos-patch-1
Browse files Browse the repository at this point in the history
Handle cors and cache control in nginx unit
  • Loading branch information
nfcampos authored Mar 9, 2024
2 parents 04b15dc + 6cd19ed commit 5a5a6ef
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/langsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ maintainers:
email: [email protected]
description: Helm chart to deploy the langsmith application and all services it depends on.
type: application
version: 0.3.6
version: 0.3.7
appVersion: "0.1.19"
31 changes: 30 additions & 1 deletion charts/langsmith/templates/backend/config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,38 @@ data:
{
"listeners": {
"*:{{ .Values.backend.containerPort }}": {
"pass": "applications/fastapi"
"pass": "routes/main"
}
},
"routes": {
"main": [
{
"match": {
"method": "OPTIONS"
},
"action": {
"return": 200,
"response_headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "$header_origin",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD",
"Access-Control-Allow-Headers": "authorization,x-tenant-id",
"Access-Control-Max-Age": "86400"
}
}
},
{
"action": {
"pass": "applications/fastapi",
"response_headers": {
"Cache-Control": "no-cache",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "$header_origin"
}
}
}
]
},
"applications": {
"fastapi": {
"type": "python 3.11",
Expand Down

0 comments on commit 5a5a6ef

Please sign in to comment.