Created
May 4, 2018 04:20
-
-
Save UsamaAshraf/2ba22d676c611a6cd21c39a4a1175541 to your computer and use it in GitHub Desktop.
Register a custom Rails middleware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/environments/development.rb | |
# … | |
# Add our own middleware before the ActionDispatch::Static | |
# middleware and pass it an array of service worker URIs as a | |
# parameter. | |
config.middleware.insert_before ActionDispatch::Static, ServiceWorkerManager, ['service-worker.js'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment