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

support protocol relative service url #1189

Open
realies opened this issue Feb 27, 2024 · 3 comments
Open

support protocol relative service url #1189

realies opened this issue Feb 27, 2024 · 3 comments
Labels
Priority: Normal Minor issue impacting one or more users Type: Feature Request A big idea that would be split into smaller pieces

Comments

@realies
Copy link

realies commented Feb 27, 2024

at the moment config.yml requires the scheme of the internal service to be specified,
this prevents internal services, like reverse proxies, to determine which protocol is used and behave accordingly;
can http and https be supported for a single service? e.g. a protocol-relative URL:

tunnel: ***
credentials-file: /home/nonroot/.cloudflared/***.json

ingress:
  - hostname: "*.example.com"
    service: //nginx-proxy-manager

  - service: http_status:404
@realies realies added Priority: Normal Minor issue impacting one or more users Type: Feature Request A big idea that would be split into smaller pieces labels Feb 27, 2024
@0xcryp70
Copy link

not possible for a single service,
but you can use a single service and handle the rest of it with a reverse proxy or load balancer

@realies
Copy link
Author

realies commented Feb 27, 2024

can you provide an example, @0xcryp70? how would the service know if the origin request was over http or https?

@0xcryp70
Copy link

0xcryp70 commented Feb 27, 2024

usually with headers like x_forward,
it can be handled on headers,
like

location / {
if ($http_x_forwarded_proto = 'https') {
}
if ($http_x_forwarded_proto = 'http') {
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Normal Minor issue impacting one or more users Type: Feature Request A big idea that would be split into smaller pieces
Projects
None yet
Development

No branches or pull requests

2 participants