diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/site.clj | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/site.clj b/src/site.clj index 15ac373..c0a6ab4 100755 --- a/src/site.clj +++ b/src/site.clj @@ -525,16 +525,13 @@ (GET "/u/:nick/:offset" (profile session (params :nick) (params :offset))) - (GET "/update-profile" (update-profile session params)) (GET "/login" (login session params)) (GET "/logout" (logout session)) (GET "/register" (serve-static "static" "register.html")) - (GET "/submit-registration" (register session params)) (GET "/:room/chat" (no-cache (validated-chat session (-> request :route-params :room)))) (GET "/chat" (no-cache (validated-chat session "RoomA"))) (GET "/browser" (browser session)) (GET "/refresh" (validated-refresh session params)) - (GET "/msg" (validated-msg session params)) (GET "/log" (validated-log session "RoomA" "0" params)) (GET "/:room/log" (validated-log session (-> request :route-params :room) @@ -543,16 +540,20 @@ (-> request :route-params :room) (-> request :route-params :offset) params)) + ;; TODO: validate POST Referrer headers for POSTs + (POST "/msg" (validated-msg session params)) + (POST "/submit-registration" (register session params)) + (POST "/update-profile" (update-profile session params)) (ANY "*" (unknown-page params))) -(decorate pichat - (with-mimetypes) - (with-session {:type :memory, :expires (* 60 60)})) -; All uploading-related actions use the with-multipart decoration. (defroutes multipart (POST "/upload" (upload session params))) +(decorate pichat + (with-mimetypes) + (with-session {:type :memory, :expires (* 60 60)})) + (decorate multipart (with-mimetypes) (with-session {:type :memory, :expires (* 60 60)}) |
