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

Handle private network preflight call #354

Merged

Conversation

blairmitchelmore-okta
Copy link
Contributor

Chrome has a preflight check for local network requests that requires our loopback listener to respond in a specific way in order to receive the proper GET request.

Chrome document: https://developer.chrome.com/blog/private-network-access-preflight/

This document also says we need to include the
Access-Control-Allow-Origin header as well in order to succeed, but in my (admittedly limited) tests that wasn't necessary. If it's deemed prudent, I can add that to this PR as well.

Chrome has a preflight check for local network requests that requires
our loopback listener to respond in a specific way in order to receive
the proper GET request.

Chrome document: https://developer.chrome.com/blog/private-network-access-preflight/

This document also says we need to include the
`Access-Control-Allow-Origin` header as well in order to succeed, but in
my (admittedly limited) tests that wasn't necessary. If it's deemed
prudent, I can add that to this PR as well.
Copy link
Collaborator

@mikenachbaur-okta mikenachbaur-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, though the Core Foundation calls really take me back. 😄

It would be nice to clean up the indentation, but I'm not going to nitpick at this point.

@blairmitchelmore-okta
Copy link
Contributor Author

This looks good, though the Core Foundation calls really take me back. 😄

It would be nice to clean up the indentation, but I'm not going to nitpick at this point.

I just noticed that the return is misaligned... 😞

@mikenachbaur-okta mikenachbaur-okta merged commit ae54891 into okta:master Mar 21, 2024
3 checks passed
@mikenachbaur-okta mikenachbaur-okta mentioned this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants