Skip to content

[enhancement] Remove polyfill event-source-polyfill #2072

@mikaelol

Description

@mikaelol

You are currently using the event-source-polyfill, which seems to have a bit troubled history, ref Yaffle/EventSource#202 and their current russian comment at the top of the README:

Пожалуйста не используйте эту обосранную библиотеку!

In english (google translate): Please do not use this shitty library!

EventSource is now supported by all major browsers and have been for multiple years, so I don't think the polyfill functionality is needed anymore. What makes it not trivial to just remove is that AKHQ uses the headers option of event-source-polyfill, which is not part of the official event source spec:

this.eventSource = new EventSourcePolyfill(
uriLiveTail(clusterId, search, selectedTopics, JSON.stringify(maxRecords)),
localStorage.getItem('jwtToken')
? {
headers: {
Authorization: 'Bearer ' + localStorage.getItem('jwtToken')
}
}
: {}
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    uiNeed an ui update

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions