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

Fixing missing http: in tempate.html and template_autogenerated.go #4

Closed
wants to merge 1 commit into from
Closed

Conversation

unfw
Copy link

@unfw unfw commented Mar 13, 2018

Fixing missing "http:" protocols in template files so that the templates properly retrieve the right remote scripts. This seems to make the template render the correct information in the output html file.


This change is Reviewable

@andmarios
Copy link
Contributor

Hi @unfw, the scheme is not missing. Links without a scheme will use the same scheme as the page.

What this means, is if you visit the coyote page via http, you will pull these resources from their http address. If you use https, you will pull these resources via https.

Your change actually breaks the output page, because if it is served under https, the browser will refuse to download the resources you hardcoded with http.

@andmarios
Copy link
Contributor

My guess is that you open the html file directly via your browser? So you get an address like file://path/to/coyote.yml?

What we usually do is to serve it under a web server. The most simple one would be to run:
python -m SimpleHTTPServer if you are on python 3.x or python -m http.server if you are on python 2.7. This will setup a http server on port 8000, and then you can visit http://localhost:8000/coyote.html.

What I actually do, is that I have this entry in my bashrc file:

alias pythonserver="python -m SimpleHTTPServer || python -m http.server"

So whenever I am, I can just run pythonserver and I get a server serving the current directory.

@unfw
Copy link
Author

unfw commented Mar 13, 2018

Ok, Can we add this to the documentation then? Clearly between aahmed-se and I, we were confused as to why we couldn't just open the file.

Thanks for explaining what I needed to do to make it work, though. We were looking at this to help validate some clusters and I didn't know about the leaving the http off thing. That's neat and useful to know about.

@andmarios
Copy link
Contributor

Yes, I will add it. Thanks for bringing it up!

@unfw
Copy link
Author

unfw commented Mar 13, 2018

Closing PR in favor of Documentation Change.

@unfw unfw closed this Mar 13, 2018
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