Phoenix CSRF protection in HTML forms, React forms, and APIs

Let’s see how Phoenix implements CSRF for standard HTML multipart forms and how to use CSRF tokens outside these forms in React forms or API calls.

Basic HTTP authentication in Elixir/Phoenix

Let’s look on what HTTP Basic authentication is and how to implement and test the HTTP Basic authentication in a Phoenix web application.

Rails handles large number of nested routes better than Sinatra

Jeremy Evans (of Roda and Sequel fame) created an interesting benchmark comparing memory and runtime performance of large number of routes (up to 10000) in various Ruby web frameworks. I was immediately interested and ran it to get the numbers.

Displaying, downloading and streaming files with Active Storage

Here is a quick’n’dirty cheat sheet for basic Active Storage actions.

How fast is Ruby 2.5, 2.6 and 2.6 –jit in generating Prawn PDFs

Takashi Kokubun (known as k0kubun), a Ruby JIT committer, asked the community for more benchmarks on upcoming Ruby 2.6 JIT. I put together one for generating PDF documents with InvoicePrinter (based on Prawn).