Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Notifications
  • Reference
  • Backend developer
  • Notification
  • Transform
  • Structured data
  • HTTP

observe_session_context/3

Refresh the context or request process for the given request or action

Called for every request that is not anonymous and before every MQTT relay from the client. Example: mod_development uses this to set flags in the process dictionary.

Type:

foldl

Return:

#context{}

#session_context{} properties:

  • request_type: http|mqtt
  • payload: union

Edit on GitHub

Related documentation

Notifications

observe_request_context/3

Refresh the context or request process for the given request or action

Notifications

observe_user_context/3

Set #context fields depending on the user and/or the preferences of the user.

Notifications

observe_auth_options_update/3

Update the given (accumulator) authentication options with the request options.

Notifications

observe_content_security_report/2

Handle a content security report

Notifications

observe_search_query_normalize_value/2

Normalize a search value for queries and indexing. An example is the normalization of texts by transliteration and removal of accents.

Notifications

observe_content_security_header(Default, Acc, Context)

Check and possibly modify the http response security headers All headers are in lowercase.

Notifications

observe_survey_result_columns/3

Add header columns for export. The values are the names of the answers and the text displayed above the column. The text format is for a…

Notifications

observe_validate_query_args/3

Called just before validation of all query arguments by z_validation.

Notifications

observe_resource_headers/3

Let all modules add resource specific response headers to the request. The accumulator is the list of headers to be set.

GitHub © 2026 Zotonic