You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/03/30 05:44:28 UTC

[GitHub] [dubbo-go-pixiu] NyxRin opened a new issue #386: about pixiu cors config

NyxRin opened a new issue #386:
URL: https://github.com/apache/dubbo-go-pixiu/issues/386


   I built a pixiu gateway to support Http access to dubbo service, and found that the OPTIONS request reported an error when configuring cross-domain. 
   POST request is worked
   This is my config in http_filters:
   - name: dgp.filter.http.cors
     config:
       allow_origin:
         - 4970-27-156-220-138.ngrok.io:80
       allow_methods: ""
       allow_headers: ""
       expose_headers: ""
       max_age: ""
       allow_credentials: false
   
   **What happened**:
   13:12
   2022-03-30T13:11:51.498+0800  ERROR  http/manager.go:90  ServeHTTP Requested URL /manga/game/manga-game/user/get not found
   github.com/apache/dubbo-go-pixiu/pkg/common/http.(*HttpConnectionManager).ServeHTTP
     /Users/zhengchen/GolandProjects/dubbo-go-pixiu/pkg/common/http/manager.go:90
   github.com/apache/dubbo-go-pixiu/pkg/filterchain.NetworkFilterChain.ServeHTTP
     /Users/zhengchen/GolandProjects/dubbo-go-pixiu/pkg/filterchain/network_filter_chain.go:45
   github.com/apache/dubbo-go-pixiu/pkg/listener/http.(*DefaultHttpWorker).ServeHTTP
     /Users/zhengchen/GolandProjects/dubbo-go-pixiu/pkg/listener/http/http_listener.go:146
   net/http.HandlerFunc.ServeHTTP
     /opt/homebrew/Cellar/go/1.17.6/libexec/src/net/http/server.go:2047
   net/http.(*ServeMux).ServeHTTP
     /opt/homebrew/Cellar/go/1.17.6/libexec/src/net/http/server.go:2425
   net/http.serverHandler.ServeHTTP
     /opt/homebrew/Cellar/go/1.17.6/libexec/src/net/http/server.go:2879
   net/http.(*conn).serve
     /opt/homebrew/Cellar/go/1.17.6/libexec/src/net/http/server.go:1930
   
   


-- 
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@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] baerwang commented on issue #386: about pixiu cors config

Posted by GitBox <gi...@apache.org>.
baerwang commented on issue #386:
URL: https://github.com/apache/dubbo-go-pixiu/issues/386#issuecomment-1082882960


   use this config file try
   
   ```yaml
         filter_chains:
             filters:
               - name: dgp.filter.httpconnectionmanager
                 config:
                   route_config:
                     routes:
                       - match:
                           prefix: "/user"
                           methods:
                             - GET
                             - OPTIONS
                         route:
                           cluster: "user"
                           cluster_not_found_response_code: 505
                   http_filters:
                     - name: dgp.filter.http.cors
                       config:
                         allow_origin:
                           - api.dubbo.com
                         allow_methods: ""
                         allow_headers: ""
                         expose_headers: ""
                         max_age: ""
                         allow_credentials: false
   ```


-- 
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@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] NyxRin closed issue #386: about pixiu cors config

Posted by GitBox <gi...@apache.org>.
NyxRin closed issue #386:
URL: https://github.com/apache/dubbo-go-pixiu/issues/386


   


-- 
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@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] NyxRin commented on issue #386: about pixiu cors config

Posted by GitBox <gi...@apache.org>.
NyxRin commented on issue #386:
URL: https://github.com/apache/dubbo-go-pixiu/issues/386#issuecomment-1084105008


   > use this config file try
   > 
   > ```yaml
   >       filter_chains:
   >           filters:
   >             - name: dgp.filter.httpconnectionmanager
   >               config:
   >                 route_config:
   >                   routes:
   >                     - match:
   >                         prefix: "/user"
   >                         methods:
   >                           - GET
   >                           - OPTIONS
   >                       route:
   >                         cluster: "user"
   >                         cluster_not_found_response_code: 505
   >                 http_filters:
   >                   - name: dgp.filter.http.cors
   >                     config:
   >                       allow_origin:
   >                         - api.dubbo.com
   >                       allow_methods: ""
   >                       allow_headers: ""
   >                       expose_headers: ""
   >                       max_age: ""
   >                       allow_credentials: false
   > ```
   
   Thanks 


-- 
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@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org