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

[BUG] Update GetPublicURL to match inbound request with most relevant AuthorizedURIs #6195

Open
2 tasks done
CtfChan opened this issue Jan 27, 2025 · 1 comment
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@CtfChan
Copy link

CtfChan commented Jan 27, 2025

Describe the bug

Relevant code (GetPublicURL):

func GetPublicURL(ctx context.Context, req *http.Request, cfg *config.Config) *url.URL {

  • If the request has a URL attached to it this function will just return the first URI in the AuthorizedURIs. Users of the helm chart might pass multiple AuthorizedURIs.

For example we passed in the following three URIs and this function was constantly picking http://flyteadmin:80 when the request was in fact coming from https://flyte/.<BASE_URL>

authorizedUris:
  - https://flyte/.<BASE_URL>
  - http://flyteadmin:80
  - http://flyteadmin.flyte.svc.cluster.local:80

Expected behavior

GetPublicURL function should try to match on hostname of the request and AuthorizedURIs list instead of returning the first element of the list.

Additional context to reproduce

No response

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@CtfChan CtfChan added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jan 27, 2025
Copy link

welcome bot commented Jan 27, 2025

Thank you for opening your first issue here! 🛠

@eapolinario eapolinario removed the untriaged This issues has not yet been looked at by the Maintainers label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants