Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cannot able to set Directives ;script-src 'self' #15874

@mtmvivek

Description

@mtmvivek

Area

admin/ui

Describe the bug

Cannot set below directives to self: script-src, script-src-elem and style-src, style-src-elem

This is because Keycloak is using some inline script and style, 'self' option will restrict that and admin page will be broken

Example: frame-src 'self'; frame-ancestors 'self'; object-src 'none';script-src 'self'

image

Will result in

image

image

Version

18.0.0

Expected behavior

The UI should render with the directives to self: script-src, script-src-elem and style-src, style-src-elem

Actual behavior

The admin console is not rendering after setting the directives to self: script-src, script-src-elem and style-src, style-src-elem

How to Reproduce?

Just set the directives to self: script-src, script-src-elem and style-src, style-src-elem

image

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions