feross / hostile

Simple, programmatic `/etc/hosts` manipulation (in node.js)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

http vs https in static html

ShapeGroup opened this issue · comments

Hello!

The problem:

  • set no https listener or configuraiton, direct http in a simple local server.
  • set a name with hostile
  • set a public folder for html files
  • put in 2 html files with 2 links

result: When you have a static html in a public folder and click on simple link, link go ever in https and not http.

heeeelp XD

-this is an amazing plugin, i love you, it work also in linux?-

Hostile only updates /etc/hosts (or the Windows equivalent file). Your problem is with your webserver or webbrowser with which we can't help you here

(if you see this twice, sorry - logged into wrong account earlier)

ah...
.. the strange is that the localhost and 127.0.0.1 work, only the links of the static files are blocked if they are tied to the new namehost.

I investigate, if I find a solution I tell, maybe it is useful.

anyway, thanks.

Sounds like strict-transport-security - perhaps you're using a .dev domain name or another hostname which your browser was told to only access over https. Overriding the IP address doesn't change any of those rules

(but still out of scope here, so I'll close now)

helmet.contentSecurityPolicy() lock to https all static links.

I'm sorry... it was my fault.

thanks.