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
  • HTTP
  • Security

observe_cors_headers/2

Set CORS headers on the HTTP response.

Type:

first

Return:

#cors_headers{} properties:

  • headers: list

Edit on GitHub

Related documentation

Notifications

observe_content_security_report/2

Handle a content security report

Notifications

observe_content_security_header(Default, Acc, Context)

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

Notifications

observe_security_headers/2

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

Controllers

controller_csp_report

Controller handling Content-Security-Policy reports.

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.

Notifications

observe_session_context/3

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

Notifications

observe_middleware/3

Delegates the request processing.

Notifications

observe_dispatch_host/2

Try to find the site for the request Called when the request Host doesn’t match any active site.

GitHub © 2026 Zotonic