You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "shreemaan-abhishek (via GitHub)" <gi...@apache.org> on 2026/02/10 04:02:45 UTC

[PR] feat(eureka): allow domain named nodes [apisix]

shreemaan-abhishek opened a new pull request, #12993:
URL: https://github.com/apache/apisix/pull/12993

   ### Description
   
   
   #### Which issue(s) this PR fixes:
   Fixes #12233
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(eureka): allow domain named nodes [apisix]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop merged PR #12993:
URL: https://github.com/apache/apisix/pull/12993


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(eureka): allow domain named nodes [apisix]

Posted by "nic-6443 (via GitHub)" <gi...@apache.org>.
nic-6443 commented on code in PR #12993:
URL: https://github.com/apache/apisix/pull/12993#discussion_r2785779477


##########
t/discovery/eureka.t:
##########
@@ -165,3 +165,34 @@ successfully updated service registry
 --- no_error_log
 failed to fetch registry from all eureka hosts
 failed to fetch registry from http://127.0.0.1:8761/eureka/
+
+
+
+=== TEST 5: verify host header with pass_host: node
+--- yaml_config eval: $::yaml_config
+--- apisix_yaml
+routes:
+  -
+    uri: /eureka/*
+    upstream:
+      service_name: APISIX-EUREKA
+      discovery_type: eureka
+      type: roundrobin
+      pass_host: node
+    plugins:
+        serverless-post-function:
+            phase: log
+            functions:
+                - "return function(conf, ctx)
+                    local core = require('apisix.core')
+                    core.log.warn('upstream_host: ', ctx.var.upstream_host)
+                    core.log.warn('upstream_addr: ', ctx.var.upstream_addr)
+                  end"
+
+#END
+--- request
+GET /eureka/apps/APISIX-EUREKA
+--- response_body_like
+.*<name>APISIX-EUREKA</name>.*
+--- error_log
+upstream_host: localhost

Review Comment:
   assert upstream_addr too



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(eureka): allow domain named nodes [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #12993:
URL: https://github.com/apache/apisix/pull/12993#discussion_r2785843344


##########
t/discovery/eureka.t:
##########
@@ -165,3 +165,34 @@ successfully updated service registry
 --- no_error_log
 failed to fetch registry from all eureka hosts
 failed to fetch registry from http://127.0.0.1:8761/eureka/
+
+
+
+=== TEST 5: verify host header with pass_host: node
+--- yaml_config eval: $::yaml_config
+--- apisix_yaml
+routes:
+  -
+    uri: /eureka/*
+    upstream:
+      service_name: APISIX-EUREKA
+      discovery_type: eureka
+      type: roundrobin
+      pass_host: node
+    plugins:
+        serverless-post-function:
+            phase: log
+            functions:
+                - "return function(conf, ctx)
+                    local core = require('apisix.core')
+                    core.log.warn('upstream_host: ', ctx.var.upstream_host)
+                    core.log.warn('upstream_addr: ', ctx.var.upstream_addr)
+                  end"
+
+#END
+--- request
+GET /eureka/apps/APISIX-EUREKA
+--- response_body_like
+.*<name>APISIX-EUREKA</name>.*
+--- error_log
+upstream_host: localhost

Review Comment:
   ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org