# Replace deprecated function builder\_opts()

**URL:** <https://forum.elixirforum.com/t/replace-deprecated-function-builder-opts/58302>\
**Category:** Questions\
**Tags:** plug, phoenix, endpoint\
**Created:** [September 15, 2023, 8:32am UTC](https://forum.elixirforum.com/t/replace-deprecated-function-builder-opts/58302 "2023-09-15T08:32:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![LostKobrakai](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lostkobrakai/32/3072_2.png) [@LostKobrakai](https://forum.elixirforum.com/u/LostKobrakai)\
**Post date:** [September 15, 2023, 8:38am UTC](https://forum.elixirforum.com/t/replace-deprecated-function-builder-opts/58302/2 "2023-09-15T08:38:12Z")

</div>

Something like this should work

```elixir
defmodule MyApp.Endpoint do
  use Plug.Router, copy_opts_to_assign: :builder_opts

  plug(:match)
  plug(:dispatch)

  def dispatch(conn, _) do
    super(conn, conn.assigns.builder_opts)
  end

```

---

_[View the full topic](https://forum.elixirforum.com/t/replace-deprecated-function-builder-opts/58302)._
