Phoenix.Sync.Plug.CORS (Phoenix.Sync v0.5.1)

View Source

A Plug that adds the necessary CORS headers to responses from Electric sync endpoints.

Phoenix.Sync.Controller.sync_render/3 and Phoenix.Sync.Router.sync/2 already include these headers so there's no need to add this plug to your Phoenix or Plug router. This module is just exposed as a convenience.

Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Functions

call(conn)

call(conn, opts)

Callback implementation for Plug.call/2.

init(opts)

Callback implementation for Plug.init/1.