-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Problem
MissingHeadersError: The response for the shape request to ... didn't include the following required headers:
- electric-offset
- electric-handle
- electric-schema
Proposal
This problem is mentioned in the troubleshooting section of the docs, but it might be nice to include a Plug to easily allow these headers.
I'd be happy to make a PR.
defmodule PhoenixSync.Plugs.ExposeElectricHeaders do
@behaviour Plug
@electric_headers ~w[
electric-cursor
electric-handle
electric-offset
electric-schema
electric-server
electric-up-to-date
]
@impl true
def init(opts), do: opts
@impl true
def call(conn, _) do
Plug.Conn.put_resp_header(
conn,
"access-control-expose-headers",
Enum.join(@electric_headers, ", ")
)
end
end
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers