跳到主要内容

openhands.server.middleware

LocalhostCORSMiddleware Objects

class LocalhostCORSMiddleware(CORSMiddleware)

Custom CORS middleware that allows any request from localhost/127.0.0.1 domains, while using standard CORS rules for other origins.

NoCacheMiddleware Objects

class NoCacheMiddleware(BaseHTTPMiddleware)

Middleware to disable caching for all routes by adding appropriate headers