response content-length is reset to 0
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
(def plural "files") | |
(def file-routes | |
(context (str "/api/" plural) [] | |
:tags [plural] | |
(GET "/" {:as request} | |
:tags [plural] | |
:query-params [file-type :- s/Str | |
file-id :- s/Any] | |
:summary (str "Streams (private) files to the client ") | |
:middleware [auth/wrap-auth-token auth/wrap-authenticated-check] | |
:description (str "Streams (private) files to the client ") | |
; this function returns a normal response, with | |
(find-and-stream-file (:upload-dir request) file-type file-id | |
{:connection (:db request) | |
:result-set-fn first})))) |
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
(def app | |
(-> (api/api | |
{:exceptions {:handlers | |
{:ex/response-validation (ex/with-logging ex/response-validation-handler :error)}}} | |
(ring.swagger.ui/swagger-ui "/api-docs") | |
(compojure.api.swagger/swagger-docs) | |
auth/authentication-routes | |
d/department-routes | |
c/candidate-routes | |
e/employee-routes | |
j/job-routes | |
t/tag-routes | |
pq/preselection_question-routes | |
f/file-routes) | |
wrap-db ;add the database conn to the request | |
wrap-uploaddir | |
wrap-reload | |
(auth/wrap-auth-cookie (:cookie-secret env)))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment