diff --git a/ai1899/api_routes.py b/ai1899/api_routes.py index 7030df5..ad52627 100644 --- a/ai1899/api_routes.py +++ b/ai1899/api_routes.py @@ -255,14 +255,15 @@ async def upsert_collection(): --- tags: - AI - consumes: - - multipart/form-data parameters: - name: file + in: formData required: true type: file - name: collection required: true + in: formData + type: string content: multipart/form-data: schema: @@ -273,12 +274,12 @@ async def upsert_collection(): in: formData description: The JSON file to be uploaded collection: - type: string + in: formData + type: formData description: The name of the collection responses: 200: description: Returns task ID - """ try: # Check if a file is present in the request diff --git a/nginx.conf b/nginx.conf index 6a28ad7..3e2ff6c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -9,6 +9,29 @@ http { proxy_pass http://ai:5555/; } + location /apidocs/ { + proxy_pass http://ai:5555/apidocs/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location /flasgger_static/ { + proxy_pass http://ai:5555/flasgger_static/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location /apispec_1.json { + proxy_pass http://ai:5555/apispec_1.json; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } location /qdrant/ { rewrite ^/qdrant/(.*) /$1 break; proxy_pass http://qdrant-container:6333/;