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

Detect cross-origin visit request attempts #180

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pklatka
Copy link
Collaborator

@pklatka pklatka commented Apr 8, 2024

Summary

This PR implements visitProposedToCrossOriginRedirect method which is responsible for detecting cross-origin visit request attempts.

Test plan

yarn clean && yarn && yarn dev:android

@pklatka
Copy link
Collaborator Author

pklatka commented Apr 8, 2024

Let's wait until new turbo-ios version is released.

@@ -333,6 +333,12 @@ class RNVisitableView(context: Context) : LinearLayout(context), SessionSubscrib
}
}

override fun visitProposedToCrossOriginRedirect(location: String) {
sendEvent(RNVisitableViewEvent.OPEN_EXTERNAL_URL, Arguments.createMap().apply {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Introduce a new property

@pfeiffer
Copy link
Contributor

Waiting on hotwired/turbo-ios#201 to be merged to upstream turbo-ios before we can merge this.

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