expressjs / expressjs/serve-index

Broken when content securiy policy headers are applied

Open
#8 23 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
447
Forks
157
PR merge metrics
No merged PRs in 30d

Description

For security reasons we are disallowing inline styles and scripts.
http://www.html5rocks.com/en/tutorials/security/content-security-policy/

As we are using the same security settings in our development environments we are running into issues when using serve-index as it relies heavily on inline styles, scripts.

Any ideas how we could handle this?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how serve-index produces its directory listing and where its inline styles and scripts are emitted. Compare that behavior with the linked Content Security Policy requirements; done would mean the listing works when inline styles and scripts are disallowed, with the chosen approach agreed in the existing discussion.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.