Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add headers-received event for extensions #206

Merged
merged 10 commits into from
Jan 29, 2025
Merged

Conversation

uwx
Copy link
Contributor

@uwx uwx commented Jan 29, 2025

Kindly squash this PR when merging, I'll fix the branch for next time

Sample of using the event:

moonlightHost.events.on('headers-received', (details: OnHeadersReceivedListenerDetails, isMainWindow: boolean) => {
    if (details.responseHeaders) {
        if(details.responseHeaders['X-Frame-Options']){
            delete details.responseHeaders['X-Frame-Options'];
        } else if(details.responseHeaders['x-frame-options']) {
            delete details.responseHeaders['x-frame-options'];
        }
    }
})

@uwx
Copy link
Contributor Author

uwx commented Jan 29, 2025

Gonna undo the generic EventEmitter because that seems to require a newer version of @types/node

@Cynosphere Cynosphere changed the base branch from main to develop January 29, 2025 20:51
@Cynosphere Cynosphere added the pr:squash-when-merging Squash when merging this pull request label Jan 29, 2025
@uwx uwx changed the title Add on-headers-received event for extensions + type moonlightHost's EventEmitter Add on-headers-received event for extensions Jan 29, 2025
@uwx uwx changed the title Add on-headers-received event for extensions Add headers-received event for extensions Jan 29, 2025
@Cynosphere Cynosphere merged commit f503b76 into moonlight-mod:develop Jan 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:squash-when-merging Squash when merging this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants