-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: add hostname check to decide http mode in windows #739
Conversation
e23ac7f
to
ead2439
Compare
ead2439
to
91fdbd2
Compare
good debugging. |
@@ -8,7 +8,9 @@ type Props = { | |||
}; | |||
|
|||
export default function ExternalLink({ to, className, children }: Props) { | |||
const isHttpMode = window.location.protocol.startsWith("http"); | |||
const isHttpMode = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we extract this check now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah best to do that, but where should this live? frontend/src/utils/ishttpmode.ts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'm not sure we should do this and actually just use a NSIS installer, if that is not much extra work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to keep as-is. Since the check is more complicated now I think extracting it into frontend/src/utils/isHttpMode.ts
would be good.
And we said we might want to do a hotfix. I will make a new milestone for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Description
Unlike Linux and Darwin, Windows doesn't allow wails:// protocol without having NSIS installer. So wails uses http://wails.localhost in Windows. This leads to the HTTP backup endpoint being requested in Windows which results in
405 Method Not Allowed