[Knacksteem] Loading site via http:// doesn't redirect to https://

in utopian-io •  5 months ago 

Project Information

Expected behavior

When a user attempts to launch Knacksteem via HTTP they should automatically be redirected to https://, based on the following pull request https://github.com/knacksteem/knacksteem.org/pull/16 the site should automatically redirect a user when attempting to load the site via http://

Actual Behaviour

If you visit http://knacksteem.org it will not automatically redirect the user, it will instead cause cross-origin errors and the categories will not be loaded. Overall the site was not usable via http://

Steps to reproduce

  1. Go to http://knacksteem.org

Note: The http:// within the URL

Error Details

The following errors are present in the console upon load of http://knacksteem.org

image.png

Issue resolution

This could potentially be resolved by using:

express-force-https in server.js

First define secure as below:

const secure = require('express-force-https')

and then add

app.use(secure)

I can see that there is already app.use(redirectToHTTPS([/localhost:(\d{4})/], [], 301)); within server.js and although I'm not familiar with that library, my solution may potentially conflict without me being able to conduct further testing.

Environment

  • Browser: Google Chrome (Version 65.0.3325.162 (Official Build) (64-bit))
  • Device: MacBook Pro (Retina, 15-inch, Late 2013)
  • Operating system: MacOS HighSierra Version 10.13

Reporting & Resolution

Since the issue that was made here:

https://github.com/knacksteem/knacksteem.org/issues/60

This issue has been resolved and if you go to http://knacksteem.org you will see that it successfully redirects you to https://knacksteem.org/. This can be seen in the following commit:

https://github.com/knacksteem/knacksteem.org/commit/578eeb6d4290bd17952ff025df0b8abd7adfa35c

GitHub Account

A link to my GitHub account can be found here:

https://github.com/tobias-g1

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi @tobias-g, thanks for this contribution.

I just tried loading the page using the following address < http://knacksteem.org/ >. I see this has now been resolved as the page was successfully redirected to https.

I like how this report is structured. I enjoyed how well you described the expected behavior, referencing the pull request https://github.com/knacksteem/knacksteem.org/pull/16 as the basis for your user expectation.

The single step you provided was enough. It was quite easy to follow, just make sure it's http and not https before the address. Well, I couldn't reproduce the error because it was already fixed :)

It can be seen in the commit that the PO put to use, the suggestion you gave, in implementing the fix.

Great job... Sorry you had to wait a month long to see it fixed :(

I look forward to more of your reports.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

·

Thank you for your review, @fego! Keep up the good work!

Hi, @tobias-g!

You just got a 1.71% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Hi @tobias-g!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @tobias-g!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

This post has been included in the latest edition of SOS Daily News - a digest of all you need to know about the State of Steem.