Enable recipe proxy tunnel and slash routes

This commit is contained in:
“Naeel”
2026-08-29 02:57:06 +03:00
parent 9f0974aaa9
commit eae62e76f8
5 changed files with 37 additions and 3 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
GEMINI_PROXY_URL=http://95.179.252.111:8768/gemini
GEMINI_PROXY_URL=http://127.0.0.1:8768/gemini
GEMINI_GENERATION_CONFIG={"temperature":0,"maxOutputTokens":300,"thinkingConfig":{"thinkingLevel":"minimal"}}
RECIPE_API_TOKEN=replace-with-random-token
+2 -1
View File
@@ -8,7 +8,7 @@ from flask import Flask, jsonify, request
app = Flask(__name__)
MAX_IMAGE_BYTES = 10 * 1024 * 1024
ALLOWED_TYPES = {"image/jpeg", "image/png", "image/webp"}
PROXY_URL = "http://95.179.252.111:8768/gemini"
PROXY_URL = "http://127.0.0.1:8768/gemini"
def settings() -> dict:
@@ -33,6 +33,7 @@ def health():
@app.post("/recipe")
@app.post("/recipe/")
def recipe():
if not authorized():
return jsonify(error="unauthorized"), 401
+1 -1
View File
@@ -12,7 +12,7 @@ location = /recipe {
}
location /recipe/ {
proxy_pass http://127.0.0.1:8770/;
proxy_pass http://127.0.0.1:8770/recipe/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
+2
View File
@@ -2,6 +2,8 @@
Description=Minimal recipe Gemini proxy
After=network-online.target
Wants=network-online.target
Requires=gemini-tunnel.service
After=gemini-tunnel.service
[Service]
User=recipe