fix: add web search stub and API catch-all for demo deployment
- Add /api/web-search stub returning empty results in demo mode - Add /aiui/api/* catch-all returning JSON 404 instead of HTML fallback - Fix nginx proxy to catch all /api/ routes (not just /aiui/api/web-search) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
87602f7887
commit
fabc7c78f7
@ -78,8 +78,8 @@ http {
|
||||
}
|
||||
}
|
||||
|
||||
# Proxy AIUI API requests (web-search, claude) to backend
|
||||
location /aiui/api/web-search {
|
||||
# Proxy AIUI API requests (web-search, etc.) to backend
|
||||
location /api/ {
|
||||
proxy_pass http://neode-backend:5959;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
@ -1078,6 +1078,16 @@ app.post('/aiui/api/claude/*', (req, res) => {
|
||||
proxyReq.end()
|
||||
})
|
||||
|
||||
// Web search stub (no search engine configured in demo)
|
||||
app.get('/api/web-search', (req, res) => {
|
||||
res.json({ results: [], error: 'Web search not available in demo mode' })
|
||||
})
|
||||
|
||||
// AIUI API catch-all for unimplemented endpoints (return JSON instead of HTML)
|
||||
app.all('/aiui/api/*', (req, res) => {
|
||||
res.status(404).json({ error: 'Not found' })
|
||||
})
|
||||
|
||||
// Health check
|
||||
app.get('/health', (req, res) => {
|
||||
res.status(200).send('healthy')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user