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

option to include back path prefix #664

Open
3 of 11 tasks
hydrargyrum opened this issue Jun 30, 2024 · 1 comment
Open
3 of 11 tasks

option to include back path prefix #664

hydrargyrum opened this issue Jun 30, 2024 · 1 comment
Labels
a:bug Something isn't working

Comments

@hydrargyrum
Copy link

Can the issue be reproduced with the latest available release? y

Which one is the environment gotify server is running in?

  • Docker
  • Linux machine
  • Windows machine
Docker startup command or config file here (please mask sensitive information)

Do you have an reverse proxy installed in front of gotify server? (Please select None if the problem can be reproduced without the presense of a reverse proxy)

  • None
  • Nginx
  • Apache
  • Caddy
Reverse proxy configuration (please mask sensitive information)
[…]
  route /gotify/* {
    uri strip_prefix /gotify
    # Set the port to the one you are using in gotify
    reverse_proxy localhost:1245
  }
[…]

On which client do you experience problems? (Select as many as you can see)

  • WebUI
  • gotify-cli
  • Android Client
  • 3rd-party API call (Please include your code)

What did you do?

curl -H "x-gotify-key: $token" 'https://example.com/gotify/message?limit=100&since=xxx'

What did you expect to see?

In the resulting JSON, next key points to https://example.com/gotify/message?limit=100&since=yyy

What did you see instead? (Include screenshots, android logcat/request dumps if possible)

Instead it points to https://example.com/message?limit=100&since=yyy losing the /gotify/ prefix.

The reverse-proxy configuration strips the prefix, so it's rather expected that gotify receives URLs without the prefix. So gotify should have an option to include that prefix when it emits URLs, like next.

@hydrargyrum hydrargyrum added the a:bug Something isn't working label Jun 30, 2024
@hydrargyrum hydrargyrum changed the title include back path prefix option to include back path prefix Jun 30, 2024
@jmattheis
Copy link
Member

Good catch, this was missed in #127. I think clients should built build the url manually and we should deprecate the next property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug Something isn't working
Development

No branches or pull requests

2 participants