How to stop http redirection to https - http

I'm setting up a test environment that does not support https. The problem is, http://localhost/simulator.aspx#!/data keeps redirecting to https://localhost/simulator.aspx#!/data.
I have tried the following steps:
going to chrome://net-internals/#hstsand deleting localhost and 127.0.0.1
Empty Cache and Hard Reload (https://galaxyinternet.us/google-chrome-redirects-localhost-to-https-fix/)
removing cached images and files in chrome://settings/clearBrowserData
nuking C:/Users/Appdata/local/Google/Chrome
Checking the disable cache in Chrome developer tools> network tab.
going to task manager and killing the Chrome process to restart.
This didn't change anything, so I tried it in an incognito window. That didn't work either.
Any ideas?

Related

Website is not loading properly on https

My website was working perfect since it was running on http. After migrating it to https , some of the css is not reflecting properly. I've checked many things like 304 error , done versioning of css files , transferred all requests to https instead of http. This is the link :- https://stratgist.com. Please check tell me the solution to this
Site is working fine to me, Just some js and css files are not loading and console showing it.
It might have cache of your browser. Open browser and do ctrl+f5 or else open site in Incognito mode/private window of your browser.

Safari keeps forcing HTTPS on localhost

When I load http://localhost:3000 in Safari, Safari automatically redirects to https://localhost:3000. How can I disable this functionality?
I went into ~/Library/Cookies/HSTS.plist and removed the localhost entry, then restarted Safari but it just re-added it to that plist file and redirected to https.
Any ideas how to fix this so that on localhost I have to explicitly say http or https?
I was able to solve this based on an answer from Ask Different.
In short, closing Safari, then running the commands below, worked.
sudo killall nsurlstoraged
rm -f ~/Library/Cookies/HSTS.plist
launchctl start /System/Library/LaunchAgents/com.apple.nsurlstoraged.plist
Restarting Safari after running that and trying to go to http://localhost:3000 solved the problem and did not redirect to to https.
Hopefully this helps someone fix this problem.
In Safari 13.0.5, deleting website data for localhost (Safari > Preferences > Privacy > Manage Website Data...) solves the problem.
This also happens if the Content Security Policy "upgrade-insecure-requests" is set. There is an open issue here: https://github.com/github/secure_headers/issues/348
You can try
deleting website data for localhost (Safari > Preferences > Privacy > Manage Website Data...)
After that close browser and try it.
If cannot you can try make different port 80 after back port 80 for localhost
After following the fix by Charlie with no luck, what worked for me was running a private window. and after a restart, everything seemed fine on both private and public tabs.
It's possible to use http://127.0.0.1:3000 instead. Or your local computer name.
For example: http://andis-mac-5.local:3000.
You can determine the local computer name from system preferences - Share - Edit:
First of all lets confirm why it is going to HTTPS.
In Developer Tools is it showing a 301 or 302 redirect?
If so it's your web server saying to go to HTTPS. Fix your web server config.
Or is it a 307 redirect which indicates HSTS?
To be perfectly honest I'm not sure if Safari shows this as a 307 (a fake internal redirect to represent HSTS), so it might just go there without showing this, but Chrome does show this.
If so, then deleting that file and restarting should solve that. However can you confirm if the HTTPS site is returning a strict-transport-security HTTP Header? If so then it will just set that next time you happen to go to HTTPS (including if your page loads and image over HTTPS). Can you remove that header? Or better yet, publish it with a max-age of 0 so it removes it from the HSTS browser cache without having to figure out which file it's in or if Safari have moved it from ~/Library/Cookies/HSTS.plist

Failed to load resource: net::ERR_CONNECTION_RESET on CDN

Recently, on the website I'm working on, I've noticed the below error in the Chrome console.
Failed to load resource: net::ERR_CONNECTION_RESET
http://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css
The bootstrapcdn.com URL works when I try to open it in a different tab. It's really slowing the page load time but it's only occurring in this browser, and only on my PC. I checked on Chrome from another PC and nothing changes.
I tried clearing my cookies but that did not work. Any idea what it could be?
Download the file & assets then serve it from your own server.
You'll lose the benefit distributed content, but gain stability equivalent to your own server and be able to set your own caching rules.
If you really want/need your assets distributed then sign up to an existing CDN service and start sending all your assets through there.

windows web server 2008 IIS7 keeps rediricting

In IIS7 I right click on the site and choose "Switch to content view" then add a text file called test.txt right click again and switch to features view. Double click the http redirect icon and see it's not forwarding.
Right click the site and switch to content view again now right click on test.txt and choose browse only to be forwarded to some other site that gives me 404 for not having /test.txt.
I don't know where to look anymore as the settings mentioned above would indicate there would be no forwarding but opening the file proves that it does.
When using forcecors plugin for firefox and making a ajax request to the text file I can see the response header: Location http://some_other_site/test.txt.
Hope it's something simple.
[update]
In the application I checked out the settings under "Url rewrite" and found a rule that redirects. Removed this rule and stopped started IIS but it's still forwarding. Could not find anything under System32\inetsvr\config that would indicate redirecting.
After removing the url rewrite rule and testing in the browser it kept on forwarding because I think my browser remembered it was moved. Cache settings on IIS should check if file has changed after it was last cached (I think last modified headers) but somehow a redirect works differently. Did not clear my browser cache and even doing that could still cause a problem with proxies caching it.
What I did was opening it this way:
http://develop.mysite.com/test.txt?refresh=newValue
Like magic I wasn't redirected and it works now. Start FF with another profile and see if that solves the problem as the new profile should not be aware of the sites response being "permanently moved" by a previous request.

Varnish page reload (F5) takes a long time on non-cached pages

Situation:
Varnish 2.1.4 lenny (latest stable) is running succesfully on Debian/Apache with mod_php.
I've got multiple Drupal sites running on this server and some are Varnish enhanced (e.g. using Pressflow). These sites work as expected.
The other sites, who aren't using the reverse-proxy, load fine when you enter the address or click around but take a really weird long time (30-45 secs) to load when you refresh the page using F5 or Ctrl+F5.
I don't think it's a VCL configuration thing; if I do a return (pass) immeditaley for one of these domains, the problem persists. Could this be related to this issue?
Are the sites that arn't using varnish still going through it?
For debugging, I would have a look at the net tab with firebug, it should give you an indication of what is taking its' time. It could be that the itial page load is fine but the other resources are taking a long time to get through.
Actually, I found out varnish 2.1.4 has some kind of problem with Apache's Keep-Alive functionalitiy (which was On). Turning it Off solved both problems!

Resources