We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Using NimbleOptions to Handle Regex and String Routes in Phx2ban
23
clicks
Source: peterullrich.com
In this article, the author shares a quick guide on enhancing the Phx2ban application by allowing users to specify routes to be ignored using both strings and regex patterns. The author explains the step taken to utilize NimbleOptions for validating these configurations, highlighting the realization that the ~r notation in Elixir is actually a Regex struct. By defining the NimbleOptions to accept a list that can contain either strings or Regex structs, the author was able to successfully validate the configuration input, ensuring users can effectively manage their routes.
Related posts
© HashMerge 2024