Skip to content

Commit dbc95ce

Browse files
committed
Update options route example
CORSPlug in pipeline is required for this example to work.
1 parent 6c810ea commit dbc95ce

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,15 @@ defmodule YourApp.Endpoint do
3535
end
3636
```
3737

38-
Alternatively you can add options routes, as suggested by @leighhalliday
38+
Alternatively you can add options routes to your scope and CORSPlug to your pipeline, as
39+
suggested by @leighhalliday
3940

4041
```elixir
42+
pipeline :api do
43+
plug CORSPlug
44+
# ...
45+
end
46+
4147
scope "/api", PhoenixApp do
4248
pipe_through :api
4349

0 commit comments

Comments
 (0)