fix: resolve SSE CORS issues and fix date filter format mismatch
This commit is contained in:
@@ -63,7 +63,7 @@ app: FastAPI = FastAPI(
|
|||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=["*"],
|
allow_origins=["*"],
|
||||||
allow_credentials=True,
|
allow_credentials=False,
|
||||||
allow_methods=["*"],
|
allow_methods=["*"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ const LiveLogs: React.FC = () => {
|
|||||||
if (timeRange !== 'all') {
|
if (timeRange !== 'all') {
|
||||||
const minutes = timeRange === '15m' ? 15 : timeRange === '1h' ? 60 : timeRange === '24h' ? 1440 : 0;
|
const minutes = timeRange === '15m' ? 15 : timeRange === '1h' ? 60 : timeRange === '24h' ? 1440 : 0;
|
||||||
if (minutes > 0) {
|
if (minutes > 0) {
|
||||||
const startTime = new Date(Date.now() - minutes * 60000).toISOString();
|
const startTime = new Date(Date.now() - minutes * 60000).toISOString().replace('T', ' ').substring(0, 19);
|
||||||
url += `&start_time=${startTime}`;
|
url += `&start_time=${startTime}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user