Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Support for base URL in mellow #129

Open
antoniozh opened this issue May 26, 2020 · 2 comments
Open

Support for base URL in mellow #129

antoniozh opened this issue May 26, 2020 · 2 comments

Comments

@antoniozh
Copy link

Hi, is a base URL feature planned? So far I have all my streaming related services under the same domain and it would be neat to have mellow under the same domain as well. I tried to rewrite the URL in nginx it but mellow redirects me to the root path afterwards.

@devster31
Copy link

I wonder if this line:

this.app.use('/', (req, res, next) => {
could be changed to allow a base url.
With something like:

const BASE_URL = process.env.BASE_URL || '/';

// ...

            this.app.use(BASE_URL, (req, res, next) => {
                req.webserver = this;
                if (req.cookies.token) req.headers.authorization = req.cookies.token;
                next();
            }, router);

//...

Not sure if there are other places where the root path is used though.

@v0idp
Copy link
Owner

v0idp commented May 28, 2020

This should probably work. I'll look into it and add it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants