Comments (4)
I'm not very familiar with CSP nonces. But a simple fix that should work:
- create a prepend.md file in the docs Markdown output folder (resources/docs/) containing just the html you need:
<head>
...
</head>
It's probably an extra head tag, but the browser should parse and handle it correctly.
You can use append.md to achieve similar functionality too.
from scribe.
Many thanks @shalvah , unfortunetely that doesn't quite solve the issue, as the problem is the built in script tags. I don't need to add anything new really, i just have to change what's already there.
The following two script tags:
<script>hljs.initHighlightingOnLoad();</script>
and
<script>
$(function() {
var languages = ["bash", "javascript"];
setupLanguages(languages);
});
</script>
Would change to something like the following:
<script nonce="{{ csp_nonce() }}">hljs.initHighlightingOnLoad();</script>
and
<script nonce="{{ csp_nonce() }}">
$(function() {
var languages = ["bash", "javascript"];
setupLanguages(languages);
});
</script>
from scribe.
Ah, no easy way to achieve that. Your best bet is writing maybe a shell script to inject it into the generated Blade file.
from scribe.
from scribe.
Related Issues (20)
- Strategy ResponseCalls running on all endpoints instead of only GET endpoints HOT 4
- getting 401 Unauthorized in each routes where i set the middleware HOT 1
- Plugin List?
- How to override post-response script content for the postman? HOT 1
- Using @apiResource as a @bodyParam? HOT 1
- scalar theme doesnt properly generate example and child attributes HOT 1
- array request not render and not examplae
- Example is not using factory HOT 1
- Missing 'Accept' => 'application/json' HOT 5
- How to send NULL values? HOT 2
- Support wider range of types
- How use recursive schema ? HOT 1
- 404 Not Found on Production HOT 6
- Multiple responses do not generate oneOf correctly
- The package is ending with a Check Failed Error HOT 1
- Badges don't work with element theme HOT 3
- Response fields overflows to dark box on default theme
- Theme Dark Mode Support HOT 1
- HTML Generated by scribe uses a version of lodash that has had a 9.1 CVE vulnerability since 2019 amongst 5 others HOT 3
- Support auto generete with laravel-data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scribe.