Closed KenEucker closed 2 years ago
Currently you can add custom CSS https://www.npmjs.com/package/swagger-ui-express#custom-css-styles and custom JS https://www.npmjs.com/package/swagger-ui-express#custom-js
Any beyond that currently is not possible. Happy to accept a PR for anything extra.
@scottie1984 unfortunately, it's the inline styles on the HTML template that cause the errors. This doesn't actually block the functionality from the javascript of swagger-ui, like I had originally thought, so this is only impacting a few styles and fonts.
I will look into creating a PR in the coming month and follow the same rubric you have set up for the custom CSS and JS, and name it to follow. Thanks for contributing to FOSS!
I am currently working through CSP on a site and have run into a problem with my swagger-ui page and not being able to edit the template. To overcome the limitations of CSP, I have implemented nonces for all inline resources. To address this on my swagger-ui-express page, I would need a mechanism for adding the nonce to the script and style tags.
Is there any way that I can do accomplish this, currently?