This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
hyperloop serving failed asset requests #16
Open
Description
a asset request that cannot be served by sprockets is passed on to hyperloop and is served, example:
Started GET "/assets/hyperloop_development-550db89dff0309e70f74f20c56c653e8fafb0c7327e80a47118d2172aef87115.js" for 127.0.0.1 at 2017-12-13 13:48:07 +0100
Processing by HyperloopController#AppRouter as JS
Parameters: {"constrains"=>#<Proc:0x00000114b24c00@/path/to/myapp/config/routes.rb:45 (lambda)>, "all"=>"assets/hyperloop_development-550db89dff0309e70f74f20c56c653e8fafb0c7327e80a47118d2172aef87115"}
Rendering inline template
************************** React Server Context Initialized AppRouter *********************************************
at the end something is served:
Rendered inline template (285.9ms)
Completed 200 OK in 296ms (Views: 185.6ms | ActiveRecord: 109.8ms)
Fix: Add constraints to route:
match '*all', to: 'hyperloop#AppRouter', via: [:get], constraints: lambda { |req| !req.path.start_with?('/assets') }
needs to be in the docs, maybe generator