Files
Shayne Wong e566f514c7 feat: add support for GPT Image 2.5 models with extended quality options and new UI components
- Introduced new image model picker component for selecting models and qualities.
- Updated image model utilities to handle new models and quality options.
- Implemented backend logic for validating image model options and handling requests.
- Added tests for image model selection, quality handling, and API interactions.
- Adjusted existing tests to accommodate new model features and ensure compatibility.
2026-09-10 19:23:50 +08:00

96 lines
2.8 KiB
Nginx Configuration File
Executable File

limit_conn_zone $binary_remote_addr zone=addr:10m;
server {
listen 80;
server_name _;
resolver 127.0.0.11 valid=30s ipv6=off;
set $backend_upstream gpt-image-panel:9090;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 50m;
location /api/import {
client_max_body_size 1000m;
proxy_pass http://$backend_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_cache off;
}
location /api/events {
proxy_pass http://$backend_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_cache off;
}
location /api/ {
proxy_pass http://$backend_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_cache off;
limit_conn addr 20;
}
location = /health {
proxy_pass http://$backend_upstream;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /_app/immutable/ {
try_files $uri =404;
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable";
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "same-origin" always;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
}
location /_protected/images/ {
internal;
alias /app/images/;
sendfile on;
expires 1y;
add_header Cache-Control "public, max-age=31536000";
add_header X-Content-Type-Options "nosniff" always;
}
location /_protected/thumbs/ {
internal;
alias /app/images/thumbs/;
sendfile on;
expires 1y;
add_header Cache-Control "public, max-age=31536000";
add_header X-Content-Type-Options "nosniff" always;
}
location / {
proxy_pass http://$backend_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_cache off;
}
}