Class DesignerSessionHeaders
java.lang.Object
com.inductiveautomation.perspective.designer.workspace.DesignerSessionHeaders
Shared JxBrowser network callback for the embedded Perspective Designer browsers.
The browser tags requests with a "designer-session-id" header so the Gateway
can resolve the shared Designer session (read side: Routes#getSession). Because the
callback is registered engine-wide, attaching it unconditionally also sent the header on the
cross-site requests a Perspective view can make (e.g. an <iframe>), leaking the session
id to external origins (IGN-15539). It now attaches the header only when the request is bound to
a connected Gateway address; every other request proceeds untouched.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHeader the Gateway reads to associate a request with the shared Designer session. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.teamdev.jxbrowser.net.callback.BeforeStartTransactionCallback.ResponsebeforeStartTransaction(com.teamdev.jxbrowser.net.callback.BeforeStartTransactionCallback.Params params) Attaches the "designer-session-id" header to requests bound for the connected Gateway, leaving all other requests untouched.
-
Field Details
-
DESIGNER_SESSION_ID_HEADER
Header the Gateway reads to associate a request with the shared Designer session.
-
-
Method Details
-
beforeStartTransaction
public static com.teamdev.jxbrowser.net.callback.BeforeStartTransactionCallback.Response beforeStartTransaction(com.teamdev.jxbrowser.net.callback.BeforeStartTransactionCallback.Params params) Attaches the "designer-session-id" header to requests bound for the connected Gateway, leaving all other requests untouched.- Parameters:
params- the transaction parameters supplied by JxBrowser.- Returns:
- an override carrying the session header for Gateway-bound requests, otherwise
proceed().
-