Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Use temporary instead of permanent redirect during login #363

Merged
merged 2 commits into from
May 11, 2020

Conversation

vgrichina
Copy link
Contributor

@vgrichina vgrichina commented May 11, 2020

When using 301 redirect it gets cached in Chrome and next time URL is opened server isn't even hit.

Fixes #358

When using 301 redirect it gets cached in Chrome and next time URL is opened server isn't even hit.
@mikedotexe
Copy link
Contributor

Wow, why does 302 behave so differently? 😵
Worked for me.

}
} catch (error) {
// console.error("Failed to find suitable port.", error.message)
// TODO: Is it? Try triggering error
// silent error is better here
}

// if we found a suitable URL, attempt to use it
if (tempUrl) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can move all this logic into the above try catch under if (!isWin) but I'm fine with it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mikedotexe I just reverted previous change in this part of code.

@vgrichina
Copy link
Contributor Author

Wow, why does 302 behave so differently? 😵

it kinda makes sense, one is temporary redirect, another is permanent redirect (so makes sense to avoid querying URL again).

Copy link
Contributor

@mikedotexe mikedotexe left a comment

Choose a reason for hiding this comment

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

alright, I'll revert the other PR that turned it off for Linux

@mikedotexe
Copy link
Contributor

I still don't understand why this works on OS X, then, but glad this is a solution.

@vgrichina
Copy link
Contributor Author

vgrichina commented May 11, 2020

alright, I'll revert the other PR that turned it off for Linux

hmm, this was already part of this PR

@vgrichina
Copy link
Contributor Author

I still don't understand why this works on OS X, then, but glad this is a solution.

Maybe it just worked in Safari? Safari doesn't cache permanent redirect it seems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"near login" auto-opens wrong Wallet link on Linux
2 participants