mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
add an option for a headless backend (#8032)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import os
|
||||
|
||||
import socketio
|
||||
|
||||
from openhands.server.app import app as base_app
|
||||
@@ -12,9 +14,10 @@ from openhands.server.middleware import (
|
||||
)
|
||||
from openhands.server.static import SPAStaticFiles
|
||||
|
||||
base_app.mount(
|
||||
'/', SPAStaticFiles(directory='./frontend/build', html=True), name='dist'
|
||||
)
|
||||
if os.getenv('SERVE_FRONTEND', 'true').lower() == 'true':
|
||||
base_app.mount(
|
||||
'/', SPAStaticFiles(directory='./frontend/build', html=True), name='dist'
|
||||
)
|
||||
|
||||
base_app.add_middleware(
|
||||
LocalhostCORSMiddleware,
|
||||
|
||||
Reference in New Issue
Block a user