You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/03/19 07:30:23 UTC

[GitHub] [apisix] Firstsawyou opened a new pull request #3871: docs: admin-api.md document adds configuration https example

Firstsawyou opened a new pull request #3871:
URL: https://github.com/apache/apisix/pull/3871


   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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.

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



[GitHub] [apisix] juzhiyuan commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r597657304



##########
File path: docs/en/latest/admin-api.md
##########
@@ -571,12 +571,16 @@ Config Example:
     "key": "",
     "name": "upstream-for-test",
     "desc": "hello world",
+    "scheme":"http",            # The scheme used when communicating with upstream, the default is `http`

Review comment:
       ```suggestion
       "scheme": "http",            # The scheme used when communicating with upstream, the default is `http`
   ```

##########
File path: docs/zh/latest/admin-api.md
##########
@@ -578,15 +578,18 @@ upstream 对象 json 配置内容:
     "checks": {},               # 配置健康检查的参数
     "hash_on": "",
     "key": "",
-    "name": "upstream-xxx",      # upstream 名称
+    "name": "upstream-xxx",     # upstream 名称
     "desc": "hello world",      # upstream 描述
+    "scheme":"http"             # 跟上游通信时使用的 scheme,默认是 `http`

Review comment:
       ditto




-- 
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r598296716



##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,32 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: Create upstream and configure the scheme as `https`.
+
+```shell
+# Create upstream and configure the scheme as `https`

Review comment:
       updated.




-- 
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.

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



[GitHub] [apisix] moonming commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r603862264



##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,32 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: Create upstream and configure the scheme as `https`.
+
+```shell
+# Create upstream and configure the scheme as `https`

Review comment:
       Please check other desc 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.

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



[GitHub] [apisix] moonming commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r598264713



##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,32 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: Create upstream and configure the scheme as `https`.
+
+```shell
+# Create upstream and configure the scheme as `https`

Review comment:
       @Firstsawyou any update?




-- 
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.

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



[GitHub] [apisix] moonming commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r597679185



##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,32 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: Create upstream and configure the scheme as `https`.

Review comment:
       This is an example of proxying to upstream https

##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,32 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: Create upstream and configure the scheme as `https`.
+
+```shell
+# Create upstream and configure the scheme as `https`

Review comment:
       We need a complete example, from apisix configuration to client access




-- 
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.

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



[GitHub] [apisix] tokers commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r598371405



##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,44 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: How to proxy upstream https.

Review comment:
       Bad title, I think "How to proxy requests to upstream with HTTPS scheme" is better.

##########
File path: docs/zh/latest/admin-api.md
##########
@@ -665,11 +668,42 @@ HTTP/1.1 200 OK
 
 ```
 
+示例二:如何代理上游 https。
+
+1、创建 route 并 配置 upstream 的 scheme 为 `https`。
+
+```shell
+$ curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "uri": "/get",
+    "upstream": {
+        "type": "roundrobin",
+        "scheme": "https",
+        "nodes": {
+            "httpbin.org:443": 1
+        }
+    }
+}'
+```
+
+执行成功后,请求与上游通信时的 scheme 将为 `https`。
+
+2、 发送请求进行测试。
+
+```shell
+$ curl http://127.0.0.1:9080/get -i

Review comment:
       IMHO, this test case lacks persuasion. You'd better also print the result returned by the upstream.

##########
File path: docs/zh/latest/admin-api.md
##########
@@ -665,11 +668,42 @@ HTTP/1.1 200 OK
 
 ```
 
+示例二:如何代理上游 https。
+
+1、创建 route 并 配置 upstream 的 scheme 为 `https`。

Review comment:
       The empty space between `并` and `配置` is redundant.




-- 
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.

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



[GitHub] [apisix] Firstsawyou commented on pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#issuecomment-802747734


   @moonming  Please have a look when you are free.


-- 
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.

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



[GitHub] [apisix] moonming commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r603770459



##########
File path: docs/zh/latest/admin-api.md
##########
@@ -665,11 +668,52 @@ HTTP/1.1 200 OK
 
 ```
 
+示例二:如何使用 HTTPS 的 scheme 将请求代理到上游。

Review comment:
       将客户端请求代理到上游https服务

##########
File path: docs/en/latest/admin-api.md
##########
@@ -571,12 +571,16 @@ Config Example:
     "key": "",
     "name": "upstream-for-test",
     "desc": "hello world",
+    "scheme": "http",           # The scheme used when communicating with upstream, the default is `http`
 }
 ```
 
-Example:
+**Example:**
+
+Example 1: Create an upstream and modify the corresponding data.

Review comment:
       modify what data? please desc more detail

##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,54 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: How to proxy requests to upstream with HTTPS scheme.

Review comment:
       Example 2: How to proxy client request to `https` upstream service




-- 
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r603838136



##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,54 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: How to proxy requests to upstream with HTTPS scheme.

Review comment:
       Updated.

##########
File path: docs/en/latest/admin-api.md
##########
@@ -571,12 +571,16 @@ Config Example:
     "key": "",
     "name": "upstream-for-test",
     "desc": "hello world",
+    "scheme": "http",           # The scheme used when communicating with upstream, the default is `http`
 }
 ```
 
-Example:
+**Example:**
+
+Example 1: Create an upstream and modify the corresponding data.

Review comment:
       Updated.

##########
File path: docs/zh/latest/admin-api.md
##########
@@ -665,11 +668,52 @@ HTTP/1.1 200 OK
 
 ```
 
+示例二:如何使用 HTTPS 的 scheme 将请求代理到上游。

Review comment:
       Updated.




-- 
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.

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



[GitHub] [apisix] Firstsawyou commented on pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#issuecomment-805403624


   @moonming Please take a look when you have time.


-- 
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r598296719



##########
File path: docs/zh/latest/admin-api.md
##########
@@ -578,15 +578,18 @@ upstream 对象 json 配置内容:
     "checks": {},               # 配置健康检查的参数
     "hash_on": "",
     "key": "",
-    "name": "upstream-xxx",      # upstream 名称
+    "name": "upstream-xxx",     # upstream 名称
     "desc": "hello world",      # upstream 描述
+    "scheme":"http"             # 跟上游通信时使用的 scheme,默认是 `http`

Review comment:
       updated.

##########
File path: docs/en/latest/admin-api.md
##########
@@ -571,12 +571,16 @@ Config Example:
     "key": "",
     "name": "upstream-for-test",
     "desc": "hello world",
+    "scheme":"http",            # The scheme used when communicating with upstream, the default is `http`

Review comment:
       updated.

##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,32 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: Create upstream and configure the scheme as `https`.

Review comment:
       updated.




-- 
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r603872525



##########
File path: docs/en/latest/admin-api.md
##########
@@ -657,12 +659,32 @@ After the execution is successful, nodes will not retain the original data, and
 
 ```
 
+Example 2: Create upstream and configure the scheme as `https`.
+
+```shell
+# Create upstream and configure the scheme as `https`

Review comment:
       Okay, I have checked for updates.




-- 
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.

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



[GitHub] [apisix] spacewander merged pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #3871:
URL: https://github.com/apache/apisix/pull/3871


   


-- 
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.

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



[GitHub] [apisix] tokers commented on pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
tokers commented on pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#issuecomment-803253112


   I cannot capture whether the https is used in client and admin api or the apisix to upstream.


-- 
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.

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



[GitHub] [apisix] Firstsawyou commented on pull request #3871: docs: admin-api.md document adds configuration https example

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#issuecomment-812481811


   @moonming Please take a look when you have time.


-- 
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.

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