The API call /internal/logs/subscribe is not working !
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
❌POST /internal/logs/subscribe - Body: clientId: the socket id, enabled: if logs are being subscribed to send via websocket in a new event logs.
### Actual Behavior
Hello, when I call POST /internal/logs/subscribe using the ComfyUI API, the server denies access and I get a cross-origin error.
```
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
```
However, I have added the following startup parameters:
```
--enable-cors-header
```
❌ /internal/logs/subscribe POST failed!
```
const payload = {
enabled: true,
clientId: this.clientId, // clientId
};
// POST
const response = await fetch(`http://127.0.0.1:8188/internal/logs/subscribe`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
```
This means the startup parameters are valid, but /internal/logs/subscribe is not working.
Can you fix this?
### Steps to Reproduce
Using the ComfyUI API to call POST /internal/logs/subscribe
POST failed!
I have added the following startup parameters:
```
--enable-cors-header
```
### Debug Logs
Access to fetch at 'http://127.0.0.1:8188/internal/logs/subscribe' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.