-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Few fixes #128
Few fixes #128
Changes from 11 commits
26c90b9
17d09ce
3d70ee8
190699f
14c39a1
9322ea1
332bea1
8728ab4
a25ea16
0ab0fa0
7e4185b
7b42fd4
15ddbf1
e1fa410
73bb67c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,13 +80,10 @@ lib-cov | |
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Feel free to suggest this change in the upstream repository: https://github.com/github/gitignore/blob/master/Node.gitignore#L32. I don't see a reason to change it here. |
||
build/Release | ||
|
||
# Dependency directories | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,20 +26,23 @@ | |
package controllers | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/SpongePowered/SpongeWebGo/cache" | ||
"github.com/SpongePowered/SpongeWebGo/fastly" | ||
"gopkg.in/macaron.v1" | ||
"net/http" | ||
) | ||
|
||
func AddHeaders(resp http.ResponseWriter) { | ||
header := resp.Header() | ||
|
||
// TODO: Needs more testing and a few changes to make it more restrictive | ||
/*header.Add("Content-Security-Policy", "default-src 'self' https:; "+ | ||
"style-src 'self' 'unsafe-inline' https:; "+ | ||
"script-src 'self' 'unsafe-eval' https://cdnjs.cloudflare.com https://www.google-analytics.com; "+ | ||
"frame-ancestors 'none'")*/ | ||
header.Set("Content-Security-Policy", "default-src 'none'; " + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move this to a separate PR, it needs careful testing and can't be accepted together with the other minor changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh ok, I didn't open a new pull because it was a rather small fix (in terms of lines) |
||
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdnjs.cloudflare.com/ ; " + | ||
"style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; " + | ||
"font-src https://cdnjs.cloudflare.com/ https://fonts.googleapis.com/; " + | ||
"connect-src 'self' https://dl-api.spongepowered.org/; " + | ||
"frame-src https://kiwiirc.com; frame-ancestors 'none'; img-src 'self'; " + | ||
"upgrade-insecure-requests; block-all-mixed-content; ") | ||
|
||
// Set cache headers only in production environment | ||
if macaron.Env == macaron.PROD { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ | |
<div class="container"> | ||
<div id="sp-logo-container" class="page-scroll"> | ||
<a class="logo" href="#top"> | ||
<img src="assets/img/icons/spongie-mark.svg" style="height: 40px"> | ||
<img src="assets/img/icons/spongie-mark.svg" alt="" style="height: 40px"> | ||
<span>Sponge</span> | ||
<i class="fa fa-fw fa-chevron-down"></i> | ||
</a> | ||
|
@@ -129,7 +129,7 @@ <h3>Our Aim</h3> | |
<p>Copyright © SpongePowered 2014-2017</p> | ||
<p id="fastly">Accelerated by<br> | ||
<a href="https://www.fastly.com"> | ||
<img src="assets/img/fastly.png" alt="Fastly" /> | ||
<img src="assets/img/fastly.png" alt="Fastly" height="45" width="100"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you add an explicit width/height? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If height and width are set, the space required for the image is reserved when the page is loaded. Thus, the page loads faster. |
||
</a> | ||
</p> | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason to remove this. The gitignore is based on a template and since this isn't breaking anything in our project I see no reason to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I knew it would end up this way