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

Change context-path not working as expected #38

Closed
dekke046 opened this issue May 14, 2020 · 1 comment · Fixed by #103
Closed

Change context-path not working as expected #38

dekke046 opened this issue May 14, 2020 · 1 comment · Fixed by #103
Labels
enhancement New feature or request

Comments

@dekke046
Copy link

Hi,

I am trying to have simple-takslist running on a different path then /
Therefore I have added:
- server.servlet.context-path=/tasklist
in the environment part of docker-compose.

It works, application is listening at /tasklist, but is giving the following layout:
image

So made more changes:

Changed the path’s in the the template files and mounted the changed template folder with docker-compose to /app/resources/templates. Changes that I made where e.g.
<form id="login-form" action="/tasklist/login" method="post">
in login.html

But also changes in header.html to add the right path.
that was already better, but adding a new user for example did not work, so I moved on to the .js files

changes to .js files, since creating user’s did not work anymore, so for example:
url: withSecurityToken('/tasklist/api/tasks/' + taskKey + '/claim'), url: withSecurityToken('/tasklist/api/users/'), url: withSecurityToken('/tasklist/api/users/' + username), in app.js and mounted to changes js folder to /app/resources/public/js

This resulted in a working app in /tasklist but only the login process did not work.

After login it does a wrong redirect (missing /tasklist prefix), if after login you change the path manually in the browser to the proper URL it works.

I suspect it is due to src/main/java/io/zeebe/tasklist/view/ViewController.java:
image

The RedirectView not respecting the path settings from server.servlet.context-path.

Thanks,

Maarten

@saig0 saig0 added the enhancement New feature or request label May 15, 2020
@saig0
Copy link
Contributor

saig0 commented Mar 18, 2021

A similar feature was implemented here: camunda-community-hub/zeebe-simple-monitor/pull/209
The PR could be adopted because the code base is similar.

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

Successfully merging a pull request may close this issue.

2 participants