|
@@ -94,6 +94,23 @@ module.exports = {
|
|
|
key: '/opt/homebrew/etc/httpd/ssl/daw.stu-key.pem',
|
|
key: '/opt/homebrew/etc/httpd/ssl/daw.stu-key.pem',
|
|
|
cert: '/opt/homebrew/etc/httpd/ssl/daw.stu-cert.pem',
|
|
cert: '/opt/homebrew/etc/httpd/ssl/daw.stu-cert.pem',
|
|
|
},
|
|
},
|
|
|
|
|
+ // Bounce /photo (Lychee) off the proxy and onto the real vhost. The proxy
|
|
|
|
|
+ // rewrites absolute URLs to protocol-relative so navigation stays on :81,
|
|
|
|
|
+ // which turns Lychee's <base href="https://daw.stu/photo"> into
|
|
|
|
|
+ // "//daw.stu:81/photo". vue-router strips the origin off <base href> with
|
|
|
|
|
+ // /^\w+:\/\/[^\/]+/ -- that needs a scheme, so protocol-relative slips
|
|
|
|
|
+ // through and becomes the router base, doubling every route into
|
|
|
|
|
+ // /photo/photo/. Nothing below watches /photo (it's a separate app with its
|
|
|
|
|
+ // own Vite build), so there's nothing to gain by proxying it.
|
|
|
|
|
+ middleware: [
|
|
|
|
|
+ function bypassLychee(req, res, next) {
|
|
|
|
|
+ if (req.url === '/photo' || req.url.startsWith('/photo/')) {
|
|
|
|
|
+ res.writeHead(302, { Location: 'https://daw.stu' + req.url });
|
|
|
|
|
+ return res.end();
|
|
|
|
|
+ }
|
|
|
|
|
+ return next();
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
files: [
|
|
files: [
|
|
|
'./**/*.php',
|
|
'./**/*.php',
|
|
|
'./src/**/*.js',
|
|
'./src/**/*.js',
|