fix: Move ParenScript route before static file route
The ParenScript route must come before the catch-all static route to properly override /static/js/auth-ui.js with dynamically compiled JavaScript. Routes are matched in order, so specific routes must precede general patterns.
This commit is contained in:
parent
74394f8388
commit
fd842a64af
|
|
@ -491,6 +491,14 @@
|
||||||
:default-stream-url (format nil "~a/asteroid.aac" *stream-base-url*)
|
:default-stream-url (format nil "~a/asteroid.aac" *stream-base-url*)
|
||||||
:default-stream-encoding "audio/aac"))
|
:default-stream-encoding "audio/aac"))
|
||||||
|
|
||||||
|
;;; ParenScript JavaScript Routes
|
||||||
|
;;; These routes serve dynamically compiled ParenScript as JavaScript
|
||||||
|
;;; MUST come BEFORE the static file route to override specific JS files
|
||||||
|
|
||||||
|
(define-page js-auth-ui #@"/static/js/auth-ui.js" ()
|
||||||
|
(:content-type "application/javascript")
|
||||||
|
(generate-auth-ui-js))
|
||||||
|
|
||||||
;; Configure static file serving for other files
|
;; Configure static file serving for other files
|
||||||
(define-page static #@"/static/(.*)" (:uri-groups (path))
|
(define-page static #@"/static/(.*)" (:uri-groups (path))
|
||||||
(serve-file (merge-pathnames (format nil "static/~a" path)
|
(serve-file (merge-pathnames (format nil "static/~a" path)
|
||||||
|
|
@ -871,13 +879,6 @@
|
||||||
(format t "~%Received interrupt, stopping server...~%")
|
(format t "~%Received interrupt, stopping server...~%")
|
||||||
(stop-server))))
|
(stop-server))))
|
||||||
|
|
||||||
;;; ParenScript JavaScript Routes
|
|
||||||
;;; These routes serve dynamically compiled ParenScript as JavaScript
|
|
||||||
|
|
||||||
(define-page js-auth-ui #@"/static/js/auth-ui.js" ()
|
|
||||||
(:content-type "application/javascript")
|
|
||||||
(generate-auth-ui-js))
|
|
||||||
|
|
||||||
(defun ensure-radiance-environment ()
|
(defun ensure-radiance-environment ()
|
||||||
"Ensure RADIANCE environment is properly configured for persistence"
|
"Ensure RADIANCE environment is properly configured for persistence"
|
||||||
(unless (radiance:environment)
|
(unless (radiance:environment)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue