From 1dcfbf2578d41c5442c21f3f58170049bb2e6f1a Mon Sep 17 00:00:00 2001 From: sostler Date: Sat, 30 Jan 2010 02:11:40 -0500 Subject: Changed submission URIs from GET to POST --- src/site.clj | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') 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)}) -- cgit v1.2.3-70-g09d2