Skip to content

Update static page styling for CSP.#361

Open
melaniekung wants to merge 2 commits into2.10from
dev/csp-static
Open

Update static page styling for CSP.#361
melaniekung wants to merge 2 commits into2.10from
dev/csp-static

Conversation

@melaniekung
Copy link
Copy Markdown
Collaborator

No description provided.

@melaniekung melaniekung requested review from anvit and sbreker March 3, 2026 20:25
@melaniekung melaniekung self-assigned this Mar 3, 2026
Copy link
Copy Markdown
Member

@sbreker sbreker left a comment

Choose a reason for hiding this comment

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

Hi Mel - It is a great idea to update this documentation and link to CSP. I have added a couple comments:

  • it is possible to still use styles and scripts with static pages, they must be signed with a nonce however.
  • it would be good to add a link to the CSP page.

------------------

You can add styled boxes around text by wrapping content in the HTML ``<div>``
element, and then using inline CSS to modify the
Copy link
Copy Markdown
Member

@sbreker sbreker Mar 31, 2026

Choose a reason for hiding this comment

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

I think this section is still demonstrating using inline styles. Can these examples be reworked with BS5 styling?

AtoM now enforces a :ref:`security-csp-headers` across the application.
As a result, inline CSS styles within static page content will no longer
be applied. Consider using Markdown formatting or BS5 classes instead where
styling is required.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add something to the effect of "CSP can be disabled which would allow inline scripts and styles to be used in static pages, but this is not recommended."?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants