Closed ghiculescu closed 6 months ago
@ghiculescu Thanks for this recommendation. I'm thinking it should probably be easier to register your domain with the library, so by default the library takes care of this logic on its own 🤔. This recommendation actually leaves an open to spoofed urls like:
https://app.hey.com@fake.domain
I need to think about this, but I think we need a new default implementation that allows you to register your app's domain.
Closing this since we have plans to better handle domain/routing logic in a more comprehensive way.
Since https://github.com/hotwired/turbo-android/pull/163, the base implementation of
shouldNavigateTo
is useful because it checks for invalid URLs. So if you override this method we should still recommend you callsuper
to get the base implementation.While here I turned the
when
into anif
per this, but I'm certainly not a Kotlin expert and happy to change it back if you prefer.