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

feat: Support path prefix in RabbitMQ scaler host URI #4589

Conversation

rtnpro
Copy link
Contributor

@rtnpro rtnpro commented May 30, 2023

This change in RabbitMQ Scaler is to support path prefix in RabbitMQ URI as allowed by the management plugin here: https://www.rabbitmq.com/management.html#path-prefix

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Tests have been added
  • Changelog has been updated and is aligned with our changelog requirements
  • A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
  • A PR is opened to update the documentation on (repo) (if applicable)
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #2634

func getPathPrefixAndVhostFromURLPath(urlPath string) (string, string) {
// Extract vhost and prefix from URL's path.
parts := strings.Split(urlPath, "/")
prefix := strings.Join(parts[0:len(parts)-1], "/")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you want path.Join() or filepath.Join()?

Ignore this finding from use-strings-join-path.

@JorTurFer
Copy link
Member

This is alrady done by #4584

@JorTurFer JorTurFer closed this Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RabbitMQ api hosted in a subpath is truncated to http://host/api/ when it shouldbe http://host/subpath/api
2 participants