Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to overwrite the basePath? #131

Closed
edu791 opened this issue Aug 26, 2020 · 3 comments
Closed

Is there a way to overwrite the basePath? #131

edu791 opened this issue Aug 26, 2020 · 3 comments

Comments

@edu791
Copy link

edu791 commented Aug 26, 2020

My bull-board path is defined inside a custom basePath, but when I load the dashboard it fails because it removes my custom basePath

@edu791
Copy link
Author

edu791 commented Aug 26, 2020

@vcapretz

@pcandido
Copy link

pcandido commented Sep 1, 2020

The same here.
It cannot find static/bundle.js on the right path. It returns 404.

I am using a reverse proxy (Nginx). My app is served under:
domain.com/app_name

So the endpoint is:
domain.com/app_name/admin/queues

And finally, the bundle is requested here:
domain.com/admin/queues/static/bundle.js

  • note the lack of [app_name]

I note that req.proxyUrl is undefined here:
https://github.com/vcapretz/bull-board/blob/792ddd5ce0df972b8cf276dd4f8ad087964cd842/src/routes/index.ts#L6

Could the problem is related to it?

@pcandido
Copy link

pcandido commented Sep 1, 2020

I got it.

Actually, proxyUrl is exactly for customization. You could set it into your req, as suggested here:

https://github.com/vcapretz/bull-board/blob/master/CHANGELOG.md#added-2

So, I did it:

const { UI } = require('bull-board')

app.use('/admin/queues', (req, res, next) => {
    req.proxyUrl = /context/admin/queues';
    next();
}, UI)

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

No branches or pull requests

3 participants