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

update setup wizard and main ui to accommodate https #2356

Merged
merged 5 commits into from
Jul 14, 2023

Conversation

elvece
Copy link
Member

@elvece elvece commented Jul 14, 2023

No description provided.

@elvece elvece requested a review from MattDHill July 14, 2023 18:37
@elvece
Copy link
Member Author

elvece commented Jul 14, 2023

Didn't add anything to final page of setup wizard. Felt the prompt to download and launch was sufficient with the updates I made to the download page, which now looks like:

Screenshot 2023-07-14 at 2 45 01 PM

@kn0wmad is working on updating the docs so I can update those link paths - will need this before release otherwise will need to add a redirect

@MattDHill
Copy link
Member

Are the addresses not showing on purpose?

@elvece
Copy link
Member Author

elvece commented Jul 14, 2023

Are the addresses not showing on purpose?

yes because i was just opening the raw html page in the browser

@@ -49,7 +49,7 @@ export class SuccessPage {
const ret = await this.api.complete()
if (!this.isKiosk) {
this.torAddress = ret['tor-address']
this.lanAddress = ret['lan-address'].replace('https', 'http')
Copy link
Member Author

@elvece elvece Jul 14, 2023

Choose a reason for hiding this comment

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

do we actually want to leave this as is? @dr-bonez

Copy link
Member

Choose a reason for hiding this comment

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

I'm not actually sure what this is for

Copy link
Member

Choose a reason for hiding this comment

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

oh, actually, I understand. Yes, we want to leave it, @MattDHill still wants to encourage http immediately after setup on lan

Copy link
Member Author

Choose a reason for hiding this comment

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

this is at the end of the setup wizard. basically, do we want to send them to https or http for first login? i just remembered this wont matter though (the browser wont block) bc they are on the lan, so https is fine, right?

Comment on lines 41 to 49
async ngOnInit() {
if (location.protocol === 'http:') {
// see if site is available securely
const res = await fetch(window.location.href.replace('http', 'https'))
if (res && res.status === 200) {
// redirect
window.location.protocol = 'https:'
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

redirect @dr-bonez
wont work for localhost, but tested setting window.location.protocol = 'https:' when on http of a current live server and it redirects properly

@dr-bonez dr-bonez merged commit 88aa150 into feature/http2-support Jul 14, 2023
dr-bonez added a commit that referenced this pull request Jul 14, 2023
* support http2 alpn handshake

* fix protocol name

* switch to https for tor

* update setup wizard and main ui to accommodate https (#2356)

* update setup wizard and main ui to accommodate https

* update wording in download doc

* fix accidential conversion of tor https for services and allow ws still

* redirect to https if available

* fix replaces to only search at beginning and ignore localhost when checking for https

---------

Co-authored-by: Lucy <12953208+elvece@users.noreply.github.com>
@MattDHill MattDHill added this to the 0.3.4.4 milestone Jul 19, 2023
@dr-bonez dr-bonez deleted the update/frontend-https branch November 9, 2023 19:33
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.

3 participants