Skip to content

Instantly share code, notes, and snippets.

View teleaziz's full-sized avatar

Aziz Abbas teleaziz

View GitHub Profile
@raghubetina
raghubetina / builder-io-404.md
Last active September 22, 2022 21:33
Delegating 404s to builder.io in Rails

Delegating 404s to builder.io in Rails

Give builder.io a chance to respond to paths that you don't have a route for before serving up a 404 page:

  1. In Gemfile, add gem 'rack-cors' and bundle.

  2. In config/application.rb, add:

     config.middleware.insert_before 0, Rack::Cors do
       allow do