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

T2R does not handle ENV[RAILS_RELATIVE_URL_ROOT] #76

Open
tonischilling opened this issue Oct 4, 2021 · 3 comments
Open

T2R does not handle ENV[RAILS_RELATIVE_URL_ROOT] #76

tonischilling opened this issue Oct 4, 2021 · 3 comments
Assignees
Labels
bug Something isn't working Priority: High
Milestone

Comments

@tonischilling
Copy link

Bug summary
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Device information

  • Type: [e.g. Desktop / Laptop / Handheld]
  • OS: [e.g. Windows 10 / Ubuntu 18.4 / MacOS 10.14.4]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@tonischilling tonischilling added the bug Something isn't working label Oct 4, 2021
@tonischilling
Copy link
Author

Hrrg! it happened again ...
so Description comes here

Bug summary
When using Redmine through a Reverse-Proxy with an URL-prefix,
this prefix will not be reproduced in T2R's "backward links".

To Reproduce

  1. Host your Redmine through a reverse proxy with an URL-prefix
    e.g. "https://from.outside.de/redmine/..." => goes internally to "http://12.34.56.78:8080/redmine/..."
  2. Use it from outside
  3. (most of?) T2R´s backward links will not contain the URL-Prefix - and thus they are broken.

Expected behavior

  • e.g.: "https//from.outside.de/time_entries.json?user_id=me&limit ..."
    should be "https//from.outside.de/**redmine/**time_entries.json?user_id=me&limit ..."

Context

  • T2R-4.3.1, Redmine-4.2.2, Rails-5.2.6, Ruby-2.7.4,
  • Apache-Config contains
    SetEnv RAILS_RELATIVE_URL_ROOT /redmine
    which is available in Rails as ENV[RAILS_RELATIVE_URL_ROOT]
    and correctly applied the other Redmine-Backward-Links

@tonischilling
Copy link
Author

tonischilling commented Oct 4, 2021

Could fix it -- for me:
(
see relevant parts of "git diff v4.3.1 all-my-hacks | tee relative_url.vimdiff"
Do not trust the line numbers, because I hacked a couple of other things, which are not part of the diff
relativ_url.vimdiff.txt
)
Probably there´s is a better - more RAILS-ish way - to do that, but for now and for me it works.

@jigarius
Copy link
Owner

I've been very busy lately. I'll try to get this one done next. Thanks for the detailed report.

@jigarius jigarius added this to the v4.4.1 milestone Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: High
Projects
None yet
Development

No branches or pull requests

2 participants