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

fix when baseUrl and routeUrl is not the same #164

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Diluka
Copy link

@Diluka Diluka commented Apr 3, 2019

Fix problems that cannot be accessed when and are not the same

scenario listenOpts.basePath app.locals.appBasePath
standalone use to mount route keep empty
middleware external base path the same

usage example

const url = new URL(config.get('server.url'));
app.use(
  '/arena',
  basicAuth({ users: { user: 'pass' }, challenge: true }),
  Arena(
    {
      queues: [
        {
          name: 'default',
          hostId: '默认',
          redis: config.get('redis[2]'),
        },
      ],
    },
    {
      disableListen: true,
      basePath: url.pathname,
    },
  ),
);

fix #162

@softbrix
Copy link

softbrix commented Jun 5, 2019

I like this configuration. Works as I expected. Downloaded this branch as a temporary fix until this is merged and deployed to npm.

@softbrix
Copy link

softbrix commented Jun 5, 2019

Small update after som more testing.
I had to configure the basePath like this for it to work when the application was hosted on the root path:
basePath: baseUrlPath != '/' ? baseUrlPath : undefined,

Dunno but I think this should be handled by the configuration so I don't need to set the basepath to 'undefined' since '/' is the default behaviour.

@skeggse
Copy link
Member

skeggse commented Oct 28, 2020

#123 (review):

This has been a long-requested feature. I'd like to move this along, but still don't have a ton of time to review. I don't immediately understand the distinction between the appBasePath and the mountPath. Along those lines, could we get some documentation in the readme describing how the new option functions and how it differs from the old?

@JoJ123
Copy link

JoJ123 commented Nov 17, 2020

@Diluka @softbrix @skeggse We are facing the same issue, can't use arena anymore with AppGateway. Is there a change that this will be released soon? This UI has some benefits vs other Bull UIs in the market.

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

Successfully merging this pull request may close these issues.

Can't be access if not deploy app on root
4 participants