Browse Source

ssl test

ssl
jywsn 10 years ago
parent
commit
bd8f036a98
  1. 2
      source/embed/index.html
  2. 24
      website/app.py
  3. 2
      website/templates/_demo.html
  4. 2
      website/templates/_description.html
  5. 2
      website/templates/_make.html
  6. 8
      website/templates/base.html
  7. 14
      website/website.crt
  8. 15
      website/website.key

2
source/embed/index.html

@ -43,7 +43,7 @@
if (trim_point > 0) {
var embed_path = window.location.href.substring(0,trim_point); // supports https access via https://s3.amazonaws.com/cdn.knightlab.com/libs/timeline/latest/embed/index.html
} else {
var embed_path = "http://cdn.knightlab.com/libs/timeline/latest/";
var embed_path = "//test.knightlab.com/libs/timeline/latest/";
}
</script>
<!-- build:js ../js/storyjs-embed-cdn.js?v214 -->

24
website/app.py

@ -83,4 +83,26 @@ def catch_all(path='index.html'):
if __name__ == "__main__":
app.run(host='0.0.0.0', port=5000, debug=True)
import getopt
ssl_context = None
port = 5000
try:
opts, args = getopt.getopt(sys.argv[1:], "sp:", ["port="])
for opt, arg in opts:
if opt == '-s':
ssl_context = (
os.path.join(site_dir, 'website.crt'),
os.path.join(site_dir, 'website.key'))
elif opt in ('-p', '--port'):
port = int(arg)
else:
print 'Usage: app.py [-s]'
sys.exit(1)
except getopt.GetoptError:
print 'Usage: app.py [-s] [-p port]'
sys.exit(1)
app.run(host='0.0.0.0', port=5000, debug=True, ssl_context=ssl_context)

2
website/templates/_demo.html

@ -14,7 +14,7 @@
font: 'NewsCycle-Merriweather',
};
</script>
<!-- build:js http://cdn.knightlab.com/libs/timeline/%(cdn)s/js/storyjs-embed.js -->
<!-- build:js //test.knightlab.com/libs/timeline/%(cdn)s/js/storyjs-embed.js -->
<script type="application/javascript">
var embed_path = "/build/"
</script>

2
website/templates/_description.html

@ -20,7 +20,7 @@
<p>Get updates, tips and news by email. No Spam.</p>
<!-- MailChimp Signup Form-->
<div id="mc_embed_signup">
<form id="mc-embedded-subscribe-form" action="http://northwestern.us2.list-manage.com/subscribe/post?u=ccc3ef81b4c3c762eb7a7d2b4&amp;id=ff5b6c54e5" method="post" name="mc-embedded-subscribe-form" target="_blank" class="validate form-inline"><span class="mc-field-group">
<form id="mc-embedded-subscribe-form" action="//northwestern.us2.list-manage.com/subscribe/post?u=ccc3ef81b4c3c762eb7a7d2b4&amp;id=ff5b6c54e5" method="post" name="mc-embedded-subscribe-form" target="_blank" class="validate form-inline"><span class="mc-field-group">
<input id="mce-EMAIL" type="email" value="" name="EMAIL" placeholder="Email" class="input-large required email"></span><span class="mc-field-group">
<button id="mc-embedded-subscribe" type="submit" value="Subscribe" name="subscribe" class="btn">Subscribe</button>
<div id="mce-responses" class="clear">

2
website/templates/_make.html

@ -231,7 +231,7 @@
<div class="span11">
<h4>Embed the code into your website</h4>
<p>Grab the embed code and paste it on your site where you want your TimelineJS to appear (just like a YouTube video).</p>
<textarea readonly="readonly" style="width: 100%; height: 160px; min-height: 110px; max-height: 300px; resize: none; font-family: Menlo,Monaco,'Courier New',monospace; font-size: 12px;" id="embed_code"><iframe src='http://cdn.knightlab.com/libs/timeline/latest/embed/?source=0Agl_Dv6iEbDadHdKcHlHcTB5bzhvbF9iTWwyMmJHdkE&font=Bevan-PotanoSans&maptype=toner&width=600&height=600' width='600' height='600' frameborder='0'></iframe></textarea><br><br>
<textarea readonly="readonly" style="width: 100%; height: 160px; min-height: 110px; max-height: 300px; resize: none; font-family: Menlo,Monaco,'Courier New',monospace; font-size: 12px;" id="embed_code"><iframe src='//test.knightlab.com/libs/timeline/latest/embed/?source=0Agl_Dv6iEbDadHdKcHlHcTB5bzhvbF9iTWwyMmJHdkE&font=Bevan-PotanoSans&maptype=toner&width=600&height=600' width='600' height='600' frameborder='0'></iframe></textarea><br><br>
<p><a href="#preview-embed" data-scroll="true" id="iframe-preview-button" class="btn btn-primary">Preview</a>
<a href="#preview-embed" data-scroll="true" id="preview-embed-link" target="_blank" class="btn">Link to Preview</a></p>
</div>

8
website/templates/base.html

@ -26,9 +26,9 @@
meta name="viewport" content="initial-scale=1,width=device-width"
someone needs to go through Blueline and fix the small viewport CSS details before we can turn this on.
-->
<link rel="shortcut icon" href="http://cdn.knightlab.com/libs/blueline/latest/assets/logos/favicon.ico">
<link rel="shortcut icon" href="//test.knightlab.com/libs/blueline/latest/assets/logos/favicon.ico">
<link href="//cloud.webtype.com/css/d4767ecb-457a-4677-8761-72f890add836.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="http://cdn.knightlab.com/libs/blueline/latest/css/blueline.min.css">
<link rel="stylesheet" href="//test.knightlab.com/libs/blueline/latest/css/blueline.min.css">
<link rel="stylesheet" type="text/css" href="{{ static_url }}/css/site.css">
<!-- Google Analytics: don't mess with this stuff -->
<!-- named tracker notes from https://developers.google.com/analytics/devguides/collection/gajs/ -->
@ -138,11 +138,11 @@
{% block scripts %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://cdn.knightlab.com/libs/blueline/latest/js/blueline.min.js"></script>
<script src="//test.knightlab.com/libs/blueline/latest/js/blueline.min.js"></script>
<!-- Override -->
<script type="text/javascript">
var generator_embed_path = "http://cdn.knightlab.com/libs/timeline/latest/embed/index.html";
var generator_embed_path = "//test.knightlab.com/libs/timeline/latest/embed/index.html";
</script>
<!-- build:js http://cdn.knightlab.com/libs/timeline/%(cdn)s/js/storyjs-embed-generator.js -->
<script type="text/javascript">

14
website/website.crt

@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICITCCAYoCCQCgqlz74c2iMDANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJV
UzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoT
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0xNTA1MDYyMTEyMzlaFw0xNjA1
MDUyMTEyMzlaMFUxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhJbGxpbm9pczEQMA4G
A1UEBxMHQ2hpY2FnbzEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2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rW3
jbJFzeqcjlyrKntsFJsGFvTelvbVGO9f0oDNlNTe57svyCBmpjRU6NfTrN0CQQCd
IEsP/WhuuWyQ8MaQjJqGFvmOSUI4vTtmi93cGlcxBqpRiJJEr+fd/slLdr2ZqeVj
GcxZ1NAg6y/EYYG7AVbbAkBfqs83kcYA/NJajh+xjq40An1033p9ZIvNRRoYfmia
wF3LJkTXoUC+IE/bRHljeau74TlozVOWFfo0qlV1atuF
-----END RSA PRIVATE KEY-----
Loading…
Cancel
Save