Skip to content

Commit e4c5e78

Browse files
Add algolia hosts to connect-src and remove some inline styles (#243)
1 parent 5eed99f commit e4c5e78

6 files changed

Lines changed: 31 additions & 14 deletions

File tree

app/assets/css/main.styl

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,21 @@ a[href="#"], a[href="#todo"], [todo]
4444
background: none
4545
padding: 0 3px 0 0
4646
font-size: 13px
47-
margin: 0
47+
margin: 0
48+
49+
.reactive-ribbon
50+
border: 0
51+
position: fixed
52+
right: 0
53+
top: 0
54+
z-index: 9000
55+
56+
.vulnerability-warning
57+
font-weight: bold
58+
color: red
59+
a
60+
color: red
61+
62+
.not-found-content
63+
min-height: inherit
64+
z-index: auto

app/controllers/Application.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class Application @Inject() (
3636
private def news(version: Option[String]): Seq[Html] = {
3737
val message = version.filter(VulnerableVersions).map { _ =>
3838

39-
s"""<p style="font-weight: bold; color: red;">You are using a version of Play Framework that has a
40-
<a style="color: red;" href="${routes.Security.vulnerability("20130806-SessionInjection")}">known vulnerability</a>.</p>
39+
s"""<p class="vulnerability-warning">You are using a version of Play Framework that has a
40+
<a href="${routes.Security.vulnerability("20130806-SessionInjection")}">known vulnerability</a>.</p>
4141
<p>Please upgrade to a later version <a href="${routes.Application.download()}">here</a>.</p>"""
4242

4343
} orElse {

app/views/documentation/v2.scala.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ <h3>Books</h3>
5656
<h1>Page not found [ @page ]</h1>
5757

5858
<p>
59-
This page does not exist in that version of the documentation. You can still use the <span style="font-weight: bold">search box above</span> to look for for that particular word or phrase.
59+
This page does not exist in that version of the documentation. You can still use the <strong>search box above</strong> to look for for that particular word or phrase.
6060

6161
<p>
62-
If you are looking for <span style="font-weight: bold">latest</span> documentation, the following links are helpful:
62+
If you are looking for <strong>latest</strong> documentation, the following links are helpful:
6363

6464
<ul>
6565
<li>
@@ -80,7 +80,7 @@ <h1>Page not found [ @page ]</h1>
8080
</ul>
8181

8282
<p>
83-
If you are looking for the <span style="font-weight: bold">latest</span> API documentation:
83+
If you are looking for the <strong>latest</strong> API documentation:
8484

8585
<ul>
8686
<li>

app/views/main.scala.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,18 @@ <h3>Social networks</h3>
177177
</div>
178178
<div class="lb-legal">
179179
<p>
180-
&copy; Lightbend 2018 |
181-
<a href="https://www.lightbend.com/legal/licenses" target="_blank">Licenses</a> |
182-
<a href="https://www.lightbend.com/legal/terms" target="_blank">Terms</a> |
183-
<a href="https://www.lightbend.com/legal/privacy" target="_blank">Privacy Policy</a> |
184-
<a href="@routes.Application.cookie()">Cookie Listing</a> |
180+
&copy; Lightbend 2018 |
181+
<a href="https://www.lightbend.com/legal/licenses" target="_blank">Licenses</a> |
182+
<a href="https://www.lightbend.com/legal/terms" target="_blank">Terms</a> |
183+
<a href="https://www.lightbend.com/legal/privacy" target="_blank">Privacy Policy</a> |
184+
<a href="@routes.Application.cookie()">Cookie Listing</a> |
185185
<a class="optanon-toggle-display">Cookie Settings</a>
186186
</p>
187187
</div>
188188

189189
</footer>
190190

191-
<a href="http://www.reactivemanifesto.org/" id="reactive_ribbon"><img style="border: 0; position: fixed; right: 0; top:0; z-index: 9000" src="//d379ifj7s9wntv.cloudfront.net/reactivemanifesto/images/ribbons/we-are-reactive-black-right.png"></a>
191+
<a href="http://www.reactivemanifesto.org/" id="reactive_ribbon"><img class="reactive-ribbon" src="https://d379ifj7s9wntv.cloudfront.net/reactivemanifesto/images/ribbons/we-are-reactive-black-right.png"></a>
192192

193193
<script src="@routes.Assets.versioned("javascripts/munchkin.js")"></script>
194194
</body>

app/views/notfound.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1>
99
</h1>
1010
</div>
1111
</header>
12-
<section id="content" style="min-height: inherit; z-index: auto;">
12+
<section id="content" class="not-found-content">
1313
<article>
1414
<br/>
1515
<h2>We're sorry, your request could not be completed as dialed. Please check the URL and try your request again.</h2>

conf/application.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ play {
2121
filters {
2222
headers {
2323
frameOptions = "sameorigin"
24-
contentSecurityPolicy="default-src 'self'; img-src 'self' *.githubusercontent.com *.google-analytics.com d379ifj7s9wntv.cloudfront.net; font-src 'self' data: fonts.gstatic.com; script-src 'self' 'unsafe-eval' www.google-analytics.com *.googleapis.com cdn.jsdelivr.net munchkin.marketo.net *.mktoresp.com optanon.blob.core.windows.net 'sha256-Mz1BSEhQ2FXaHzVWxucxc0+PCwT6oyt/5UPqDVlUugs=' 'sha256-1IG7kxxg7+f1m8Iu+Dk44NMBBV2ZjAkq7dalJrzDJMM=' 'sha256-n73RBf/LVzJGkBNoNFYhY2JnwJDTOX/xUOK5XYVcFOI=' 'sha256-DScy2dpFEzZofKeEv/orAZJj/q21B49aHew7suEpfFs=' 'sha256-17TcZWrBMS5XH+2P8hJM6WdgJNdvHZC6w6nhVdCKQoA='; style-src 'self' fonts.googleapis.com cdn.jsdelivr.net optanon.blob.core.windows.net 'sha256-HNYzPTRt75YR/Yjz4EVJvRKMVMBbL6CMpl655m4gDcw='; connect-src 'self' *.mktoresp.com"
24+
contentSecurityPolicy="default-src 'self'; img-src 'self' *.githubusercontent.com *.google-analytics.com d379ifj7s9wntv.cloudfront.net; font-src 'self' data: fonts.gstatic.com; script-src 'self' 'unsafe-eval' *.algolia.net *.algolianet.com www.google-analytics.com *.googleapis.com cdn.jsdelivr.net munchkin.marketo.net *.mktoresp.com optanon.blob.core.windows.net 'sha256-Mz1BSEhQ2FXaHzVWxucxc0+PCwT6oyt/5UPqDVlUugs=' 'sha256-1IG7kxxg7+f1m8Iu+Dk44NMBBV2ZjAkq7dalJrzDJMM=' 'sha256-n73RBf/LVzJGkBNoNFYhY2JnwJDTOX/xUOK5XYVcFOI=' 'sha256-DScy2dpFEzZofKeEv/orAZJj/q21B49aHew7suEpfFs=' 'sha256-17TcZWrBMS5XH+2P8hJM6WdgJNdvHZC6w6nhVdCKQoA='; style-src 'self' fonts.googleapis.com cdn.jsdelivr.net optanon.blob.core.windows.net 'sha256-HNYzPTRt75YR/Yjz4EVJvRKMVMBbL6CMpl655m4gDcw=' 'sha256-DBEW4pxWYTcPK7CjJPI+BiO8HUcAwfzMzbFusCyqWWQ=' 'sha256-wYq1X7cBoJbqNegyYiUCSuwas5okdICKhCGXkQLi/EM=' 'sha256-9DTrbcAci4RgTNhuuPqjM9Fs+58Ek/5sYa0HpsNACE4='; connect-src 'self' *.mktoresp.com *.algolia.net *.algolianet.com"
2525
}
2626
hosts {
2727
allowed = [".playframework.com", "localhost", "playframework-com-app"] # playframework-com-app is the upstream host configured in nginx

0 commit comments

Comments
 (0)