|
|
@ -23,11 +23,12 @@
|
|
|
|
[("html" (string-arg)) (route-wrapper route-html)]
|
|
|
|
[("html" (string-arg)) (route-wrapper route-html)]
|
|
|
|
[else (λ(req)
|
|
|
|
[else (λ(req)
|
|
|
|
;; because it's the "else" route, can't use string-arg matcher
|
|
|
|
;; because it's the "else" route, can't use string-arg matcher
|
|
|
|
;; so extract the path manually
|
|
|
|
(define request-url (request-uri req))
|
|
|
|
(define req-uri (request-uri req))
|
|
|
|
;; /inform is a magic servlet that must be allowed to pass through
|
|
|
|
(define path (reroot-path (url->path req-uri) pollen-file-root))
|
|
|
|
(when (not (equal? (url->string request-url) "/inform"))
|
|
|
|
(define force (equal? (get-query-value req-uri 'force) "true"))
|
|
|
|
(let ([path (reroot-path (url->path request-url) pollen-file-root)]
|
|
|
|
(route-preproc path #:force force)
|
|
|
|
[force (equal? (get-query-value request-url 'force) "true")])
|
|
|
|
|
|
|
|
(route-default path #:force force)))
|
|
|
|
(next-dispatcher))]))
|
|
|
|
(next-dispatcher))]))
|
|
|
|
|
|
|
|
|
|
|
|
(displayln "Ready to rock")
|
|
|
|
(displayln "Ready to rock")
|
|
|
|