### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

In version 1.4.0 OpenSearch is returning invalid responses when specifying gzip encoding. This was working in 1.3.1. The proxied response is not gzip encoded even though the content-encoding response header says its gzip. Reproduction steps show the differences between the output directly from OpenSearch vs the proxied result.

### Expected Behavior

Returning properly encoded responses.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

```
version: "3.9"

services:
  opensearch:
    container_name: opensearch
    image: opensearchproject/opensearch:2.3.0
    environment:
      - node.name=opensearch
      - cluster.name=opensearch-docker-cluster
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
      - "DISABLE_SECURITY_PLUGIN=true"
    ports:
      - "9200:9200"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data01:/usr/share/opensearch/data

  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
    image: localstack/localstack
    ports:
      - "4566:4566"
    depends_on:
      - opensearch
    environment:
      - OPENSEARCH_CUSTOM_BACKEND=http://opensearch:9200
      - DEBUG=${DEBUG- }
      - PERSISTENCE=${PERSISTENCE- }
      - DOCKER_HOST=unix:///var/run/docker.sock
    volumes:
      - "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"

volumes:
  data01:
    driver: local
```

1. Run docker compose
```sh
docker-compose up -d
```

2. Create the OpenSearch domain:
```
awslocal opensearch create-domain --domain-name my-domain
```

3. Test - Notice content length and output
```
curl -v -X GET my-domain.us-east-1.opensearch.localhost.localstack.cloud:4566/  -H 'Accept-Encoding: gzip' --output -
curl -v -X GET localhost:9200/ -H 'Accept-Encoding: gzip' --output -
```


### Environment

```markdown
- OS:
- LocalStack: latest 1.4.0
```


### Anything else?

_No response_
master_username = advanced_security_options.get("MasterUserOptions", {}).get(
            "MasterUserName", None
        )
        master_password = advanced_security_options.get("MasterUserOptions", {}).get(
            "MasterUserPassword", None
        )
        if not master_username and not master_password:
            raise ValidationException(
                "You must provide a master username and password when the internal user database is enabled."
            )
        if not master_username or not master_password:
            raise ValidationException("You must provide a master username and password together.")
        return SecurityOptions(
            enabled=advanced_security_options["Enabled"] or False,
            master_username=master_username,
            master_password=master_password,
        )
def register_cluster(
    host: str, path: str, forward_url: str, custom_endpoint: CustomEndpoint
) -> List[Rule]:
    """
    Registers routes for a cluster at the edge router.
    Depending on which endpoint strategy is employed, and if a custom endpoint is enabled, different routes are
    registered.
    This method is tightly coupled with `cluster_manager.build_cluster_endpoint`, which already creates the
    endpoint URL according to the configuration used here.
    :param host: hostname of the inbound address without scheme or port
    :param path: path of the inbound address
    :param forward_url: whole address for outgoing traffic (including the protocol)
    :param custom_endpoint: Object that stores a custom address and if its enabled.