xwc1125 opened a new issue, #7608:
URL: https://github.com/apache/apisix/issues/7608

   ### Description
   
   ## Use the authz-casdoor to auth, when redirect to 9080 port err . The err 
msg is "503 Service Temporarily Unavailable"
   ### 1. casdoor application:
   <img width="604" alt="image" 
src="https://user-images.githubusercontent.com/4408289/182744126-f66383bb-2fd7-4c68-b3fa-cf4e7031551a.png";>
   
   ### 2. set router:
   
   ```shell
   curl "http://127.0.0.1:9080/apisix/admin/routes/1"; -H "X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
   {
     "methods": ["GET"],
     "uri": "/anything/*",
     "plugins": {
       "authz-casdoor": {
           "endpoint_addr":"http://10.78.44.46:8000";,
           "callback_url":"http://10.78.44.46:9080/anything/callback";,
           "client_id":"00ecb282bc314667fc11",
           "client_secret":"e3923ad0025b4bb39bf3825ee9e5aa8fa5f1a62d"
       }
     },
     "upstream": {
       "type": "roundrobin",
       "nodes": {
         "httpbin.org:80": 1
       }
     }
   }'
   ```
   ### 3. request url: http://127.0.0.1:9080/anything/test
   #### 3.1 login: 
   <img width="412" alt="image" 
src="https://user-images.githubusercontent.com/4408289/182744402-9dbe9425-2f75-45a5-8abd-2babaadd3554.png";>
   
   #### 3.2 response err: 
   <img width="480" alt="image" 
src="https://user-images.githubusercontent.com/4408289/182744563-f16a9a70-18cf-4999-b947-f5ac0e5dd15e.png";>
   
   #### 3.3 apisix err log: 
   <img width="1090" alt="image" 
src="https://user-images.githubusercontent.com/4408289/182744628-6db50461-b3dc-48e7-8a33-26b43fdb5ff9.png";>
   
   ### 4. change the request ip,request url: 
http://10.78.44.46:9080/anything/get
   #### 4.1 response err: 
   <img width="487" alt="image" 
src="https://user-images.githubusercontent.com/4408289/182745094-f89924b9-59e5-49c8-815f-afc5564ca33c.png";>
   
   #### 4.2  apisix err log: 
   <img width="1091" alt="image" 
src="https://user-images.githubusercontent.com/4408289/182745139-d30307a4-2b88-47c5-a284-dc4341cdfe18.png";>
   
   #### 4.3 curl in docker container success: 
   <img width="761" alt="image" 
src="https://user-images.githubusercontent.com/4408289/182745415-27e2bc59-9186-4e53-95d8-d0481b71313a.png";>
   
   
   
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.15.0-alpine
   - Operating system (run `uname -a`):  Darwin xwc1125 21.6.0 Darwin Kernel 
Version 21.6.0: Sat Jun 18 17:07:25 PDT 2022; 
root:xnu-8020.140.41~1/RELEASE_X86_64 x86_64
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 
openresty/1.21.4.1
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):  bitnami/etcd:3.4.15
   - APISIX Dashboard version, if relevant: apache/apisix-dashboard:2.13-alpine
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to