iFrame Notifier for NGINXΒΆ
DescriptionΒΆ
This Ansible role injects a small JavaScript snippet into your HTML responses that enables parent pages to get notified whenever the iframeβs location changes and forces external links to open in a new tab.
OverviewΒΆ
This role injects a JS snippet into HTML to notify parent windows of iframe location changes and force external links to new tabs.
CosmosΒΆ
The diagram places iFrame Notifier for NGINX in the Infinito.Nexus cosmos: the components it deploys (capabilities), the central services it consumes (dependencies), and its outward reach (federation and bridged external networks).
flowchart LR
subgraph role [sys-front-inj-dashboard π»]
svc_dashboard["dashboard"]
end
Solid 1:1 edges are fixed relationships; dashed 0..1 edges are conditional (enabled only in matching deployments); red 0..0 edges are turned off in this role. Node markers show the roleβs deploy modes (π» host, π³ compose, π swarm); β marks a service that is explicitly turned off, and βοΈ an Ansible role dependency declared in meta/main.yml.
FeaturesΒΆ
Location Change Notification
UsespostMessageto inform the parent window of any URL changes inside the iframe (including pushState/popState events) for seamless SPA support.External Link Handling
Automatically setstarget="_blank"andrel="noopener"on links pointing outside your primary domain to improve security and user experience.Easy CSP Integration
Calculates a CSP hash for the injected script so you can safely allow it via your Content Security Policy.
CreditsΒΆ
Implemented by Kevin Veen-Birkenbach. Part of the Infinito.Nexus Project and maintained by Kevin Veen-Birkenbach. Licensed under the Infinito.Nexus Community License (Non-Commercial).