operaton / operaton/operaton

webapps-neo does not work when served from a sub-path (application-path)

Open
#3,677 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug scope:webapp-neo
Dominant language
Java
Stars
469
Forks
128
Avg merge
1d 42m
Merged PRs (30d)
156

Description

operaton.bpm.webapp.neo.application-path is a documented property with integration tests behind it (ChangedAppPathIT), but the SPA it configures only works at the server root. With operaton.bpm.webapp.neo.application-path=/app-neo, a request for /app-neo/ gets as far as the HTML shell and stops there.

What breaks, in order

Request Result Why
/app-neo/ 200 The view controller forwards to index.html. This part works.
/assets/index-*.js 404 The built index.html references its assets root-absolutely, but the resource handler is mounted at /app-neo/**. Blank page.
/locales/en-US/*.json 404 i18next-http-backend's default loadPath is root-absolute.
client-side routing 404 page LocationProvider sees /app-neo/…, every <Route path> starts at /. Nothing matches.

The tests in ChangedAppPathIT only cover the filter chain, the API namespace and the root redirect — none of them loads an asset or a client route, which is why this went unnoticed. The same assumption is baked into the standalone nginx image (env.sh / nginx.conf), which cannot serve the bundle from a prefix either.

Fixing only the first row moves the failure to the next one, so this is one piece of work: the server has to declare the application root in <base href> (the only place a browser reads a prefix from), the bundle has to emit relative asset URLs, and every route, link and route() target has to carry the prefix.

Follow-up to #3514, which made the packaged distribution usable at the root.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ChangedAppPathIT and the view controller, then inspect the SPA's index.html and the asset, locale, routing, link, and route() behavior under /app-neo/. Check env.sh and nginx.conf for the standalone image. Done means the integration coverage exercises an asset and client route successfully from a prefix, with locale loading also working.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, nginx
Domain
backend, devops, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.