Introduction to Http Listener

Introduction to Http Listener

Http Listener is a listener specifically designed to receive HTTP requests. It can set the address and port for HTTP listening. It can be introduced through the following configuration.

  1. static_resources:
  2. listeners:
  3. - name: "net/http"
  4. protocol_type: "HTTP" # Indicates the HTTP Listener is being introduced
  5. address:
  6. socket_address:
  7. address: "0.0.0.0" # Address
  8. port: 8883 # Port

The specific implementation of the Http Listener can be referred to in pkg/listener/http.

For cases related to HTTP Listener, you can refer to:

  • Conversion of HTTP to Dubbo requests, Case
  • HTTP request proxy, Case

Currently, the HTTPS protocol is also supported. You can change protocol_type to HTTPS and add domains and certs_dir to specify the domain and certificate file directory.

  1. listeners:
  2. - name: "net/http"
  3. protocol_type: "HTTPS"
  4. address:
  5. socket_address:
  6. domains:
  7. - "sample.domain.com"
  8. - "sample.domain-1.com"
  9. - "sample.domain-2.com"
  10. certs_dir: $PROJECT_DIR/cert

For specific cases, you can check Case

Feedback

Was this page helpful?

Yes No

Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)