Links opening in Safari, instead of app

I’ve encountered this problem recently and I can’t figure out how to fix it. Basically, the internal, relative paths are opening on Safari instead of inside the iOS app. Here’s some context, I’m running rails 6.1.5 with turbo-rails 1.0.1. I followed the upgrading guide “Compatibility with Rails UJS”

On the iOS side, I’m running a slightly modified version of @dalezak’s “Turbo-iOS base project”, you can see the repo here. The package dependency point to turbo-ios 7.0.0-rc.6.

I’m not sure if I’m 100% sure on this, but it seems like it’s treating all those links as external.

extension TurboController: SessionDelegate {
    func session(_ session: Session, openExternalURL url: URL) {
        let safariViewController = SFSafariViewController(url: url)
        present(safariViewController, animated: true, completion: nil)

When I print() the url, I can see it as an absolute path like http://localhost:3000/some-page-url, same behavior happens on a test env. But on HTML code it’s relative.

I’m a bit lost, to say the least, I’m not sure if the error is on the rails side or the swift side. Any help would be very much appreciated. And please let me know if I need to share more stats or code. Thanks!