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

outbound-http: Support "relative" URIs to current app #1533

Closed
lann opened this issue May 22, 2023 · 3 comments · Fixed by #1710
Closed

outbound-http: Support "relative" URIs to current app #1533

lann opened this issue May 22, 2023 · 3 comments · Fixed by #1710
Assignees
Labels
area/app-def-and-config Application definition and manifest enhancement New feature or request

Comments

@lann
Copy link
Collaborator

lann commented May 22, 2023

This has been requested a couple of times and should be relatively straightforward:

  • Add a field to OutboundHttp e.g. origin: Uri which gets updated from each inbound request
  • If an outbound request starts with a / (has no scheme or authority), join with the origin
@itowlson
Copy link
Contributor

If the application has a base, should "relative" URLs be relativised to that base, or to the host? (The reference to "current app" makes me assume this is relative to the app base but I want to check!)

@lann
Copy link
Collaborator Author

lann commented May 23, 2023

First, I'd like to get rid of base 😅.

I'm not sure which would be less confusing. Magically prepending things to /path seems like it might be more surprising, even if it is logical from "inside the app".

@radu-matei
Copy link
Member

ref #957

@fibonacci1729 fibonacci1729 added enhancement New feature or request area/app-def-and-config Application definition and manifest labels Jun 5, 2023
@michelleN michelleN self-assigned this Aug 21, 2023
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self.local` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self.local is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Aug 31, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Sep 1, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Sep 1, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
michelleN added a commit to michelleN/spin that referenced this issue Sep 1, 2023
+ use special value `self` in allowed_http_hosts
to allow components in the same spin app to make outbound
http requests to each other
+ make requests with relative routes in app once self is set
+ update example for rust outbound http to demonstrate capability
+ adds e2e
+ resolves fermyon#957
+ resolves fermyon#1533

Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/app-def-and-config Application definition and manifest enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants