Jaycean edited a comment on pull request #1675:
URL: https://github.com/apache/apisix-dashboard/pull/1675#issuecomment-809023973


   > Okay, @Jaycean, I'm opening an issue.
   > See the ci is also failing with a 404 for that particular test.
   > 
![image](https://user-images.githubusercontent.com/41498427/112711555-4328b000-8eef-11eb-891b-55b896818fe0.png)
   
   @bisakhmondal 
   This error is that the URI created by APISIX is forwarded to the upstream, 
and the corresponding interface is also required. I checked the conf in the 
upstream image and found that the supporting interface is `hello` `hello1` 
`hello_` You can change update URI to `hello_`
   
   File path:In the docker container:  johz/upstream
   /usr/local/openresty/nginx/conf/lua/server.lua
   ```
   function _M.hello()
       ngx.say("hello world")
   end
   
   function _M.hello1()
       ngx.say("hello1 world")
   end
   
   function _M.hello_()
       ngx.say("hello world")
   end
   ```
   
   `hellohello` is not supported in the upstream interface, so the error 
returned is 404.
   ```
   function _M.go()
       local action = string.sub(ngx.var.uri, 2)
       action = string.gsub(action, "[/\\.]", "_")
       if not action or not _M[action] then
           return ngx.exit(404)
       end
   
       inject_headers()
       return _M[action]()
   end
   ```


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


Reply via email to