Skip to content

feat: add option for backend alias in chart #2720

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

samczsun
Copy link

@samczsun samczsun commented Jul 9, 2025

I'm creating a deployment which uses an ALB Ingress (perhaps future PR to support different Ingress configurations) but for now the ability to configure the backend alias would be very helpful

@ikreymer
Copy link
Member

ikreymer commented Jul 9, 2025

Can you also add a commented out version of backend_alias to chart/values.yaml, explaining what it would do?
Not sure I fully understand the use case, is this an external alternative origin to access the frontend?
The APP_ORIGIN is used as a fallback when the origin can't be detected from the request..

@samczsun
Copy link
Author

samczsun commented Jul 10, 2025

The APP_ORIGIN is used as the default_origin here

default_origin = os.environ.get("APP_ORIGIN", "")

Which is returned as the origin if no headers are provided

def get_origin(headers) -> str:
"""Return origin of the received request"""
if not headers:
return default_origin

But no callers of get_crawl_out supply any headers, which means that my api was returning a backend URL of localhost:9870 for the pagesQueryUrl

async def get_crawl_out(
self,
crawlid: str,
org: Optional[Organization] = None,
type_: Optional[str] = None,
skip_resources=False,
headers: Optional[dict] = None,
) -> CrawlOutWithResources:

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.

2 participants