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

Fixes #8 - Separate javascript and css from directory.html #9

Closed
wants to merge 3 commits into from

Conversation

jantimon
Copy link

Fixes #8 - Separate javascript and css from directory.html to be compliant with content security policy

…o be compliant with content security policy
index.js Outdated
@@ -43,18 +43,28 @@ var defaultTemplate = join(__dirname, 'public', 'directory.html');

var defaultStylesheet = join(__dirname, 'public', 'style.css');

/*!
* Stylesheet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has the wrong comment.

@dougwilson
Copy link
Contributor

The tests fail because you removed the {style} token, which people use.

server = createServer('test/fixtures', {
'stylesheet': __dirname + '/shared/styles.css',
'template': __dirname + '/shared/template.html'
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this change to the test; this makes the test completely different from that it was trying to test. The purpose of the test is to use a custom stylesheet with the default template.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those styles are still there but no longer inline but will still work when using custom templates.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, then change the second part of the test to verify the custom style is there, but you MUST use the default template for this test.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I see your point will fix that

@dougwilson
Copy link
Contributor

Closing stale pull request that has open concerns that were never addressed in follow up commits and the code no longer merges into master. The underlying issue #8 still needs to be fixed, and if someone wants to open a pull request that addresses the comments above and merges into master would be happy to take a look 👍 This repo is being reworked and trying to get these old issues unstuck.

@dougwilson dougwilson closed this Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken when content securiy policy headers are applied
2 participants