How to inject JavaScript anywhere


Inject JavaScript code into the head or body of any route with Fortify. All code is server-side injected so that it is available immediately when the page loads.

Additional Notes

All scripts should be surrounded with HTML <script> tags

Step 1
Configure and install Fortify.

This demo uses Fortify to inject JavaScript code into the page.

Route Configuration

Configuration Notes
my hello fortify scripts
Route URL
Injected head scripts
console.log('hello fortified console')
Injected body scripts
var elem = document.createElement("h2"); elem.innerText = "hello fortified world"; document.body.appendChild(elem);
Step 2
Your requests are Fortified!

Once installed, navigate to your site and open your Developer Console or check out the page in the browser below.