           (-> (make-handler component)
               ring.keyword-params/wrap-keyword-params
               ring.params/wrap-params
+              ;; Should really be doing the additional params processing here, but it might change request by request, so need to think at least a bit about this
               (auth/wrap-basic-authentication (partial authenticated? component))
               log-requests)]
       ;redirect-http-to-https-if-required

  ([darwin filename]
   (let [expiration (-> darwin :config :export :expiry-days)]
     (generate-aws-url! darwin filename expiration))))


;; What follows is the guts of our responding and computing.

  ["/" {"ping"      ping-handler
        "datadump/" {"ping"    ping-handler
                     "get"     #(get-datadump-handler darwin %)
                     "status"  #(get-datadump-status-handler darwin %)
                     "results" #(filename-request-handler darwin %)}}])

(defn make-handler [darwin]
  (bidi.ring/make-handler (routes darwin)))
