Created
March 9, 2019 04:45
-
-
Save justinstoller/bf2068dfb71d993bb9b2b947f9173b8b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
in master-service we call | |
master-core/construct-root-routes w/ | |
puppet-version (string from config) | |
use-legacy-auth-conf (bool from config) | |
jruby-service (instance of JRubyService) | |
get-code-content (fn from VersionedCodeService) | |
get-code-id (fn from VersionCodeService) | |
handle-request (fn from RequestHandlerService) | |
environment-class-cache-enabled (bool from config) | |
creates "ruby-handler" by calling get-wrapped-handler w/ | |
route-handler (is handle-request above - fn from RequestHandlerService) | |
auth-fn (from tk-auth) | |
puppet-version | |
use-legacy-auth-conf | |
conditionally wraps route-handler depending on value of use-legacy-auth-conf creating "maybe-with-auth-handler" | |
calls wrap-middleware w/ | |
"maybe-with-auth-handler" | |
puppet-version | |
wraps "maybe-with-auth-handler" with middleware that adds: | |
plaintext responses for uncaught errors | |
request logging | |
locale negotiator | |
response logging | |
header for puppet version | |
creates "clojure-wrapper" | |
by returning a fn that takes a handler, wraps the given handler a ring middleware that decodes uri-encoded input and adds the inputs to a body | |
then calls "get-wrapped-handler" as above (why would "clojure" routes depend on deprecated auht.conf behavior?? | |
then calls "root-routes" w/ | |
ruby-handler | |
clojure-middleware | |
jruby-service | |
get-code-content-fn | |
get-code-id-fn | |
env-class-cache-enabled | |
root-routes then calls v3-routes with all given args and v4-routes with just jruby-service and clojure-widdleware | |
v3-routes calls v3-ruby-routes w/ just the ruby-handler, setting up each http route to pass any requests straight into the ruby handler except where adding `:include-code-id? true` to the request map | |
v3-routes calls v3-clojure-routes w/ all the given arguements save for the ruby-handler and clojure-middleware | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment