### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Listing buckets with ASF Provider fails.
```
awslocal --endpoint-url=http://aws.mycompany..local/ s3api --region us-east-1 list-buckets

An error occurred (NoSuchBucket) when calling the ListBuckets operation: The specified bucket does not exist
```

### Expected Behavior

Listing buckets with ASF provider should return a json response.

### How are you starting LocalStack?

Custom (please describe below)

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

Localstack helm chart is executing against a kind cluster, with port mappings. The kind cluster config looks like this
```
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: local
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    protocol: TCP
  extraMounts:
    - hostPath: ./charts/_localstack/init-scripts
      containerPath: /localstack/init-scripts
      readOnly: true
```

The helm chart values.yaml looks like this
```
debug: true
image:
  tag: 1.3.1
volumes:
  - name: init-scripts
    # Mounted by kind.yaml
    hostPath:
      path: /localstack/init-scripts
volumeMounts:
  - name: init-scripts
    mountPath: /etc/localstack/init/ready.d
    readOnly: true
ingress:
  enabled: true
  hosts:
    - host: aws.mycompany.local
      paths:
        - path: /
          pathType: ImplementationSpecific
extraEnvVars:
  # Disable usage tracking
  - name: DISABLE_EVENTS
    value: "1"
  - name: PROVIDER_OVERRIDE_S3
    value: asf
  - name: LS_LOG
    value: trace
```
#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
```
aws configure set cli_follow_urlparam false
BUCKET=mybucket
awslocal s3 mb s3://$BUCKET
awslocal s3api \
  put-bucket-notification-configuration \
  --bucket $BUCKET \
  --notification-configuration '{ "EventBridgeConfiguration": {} }'
awslocal s3api \
  put-bucket-cors \
  --bucket $BUCKET \
  --cors-configuration '{
  "CORSRules": [
    {
      "AllowedOrigins": ["http://app.mycompany.local","https://app.mycompany.local"],
      "AllowedHeaders": ["*"],
      "AllowedMethods": ["PUT", "GET"],
      "MaxAgeSeconds": 3000
    }
  ]}'

# snip
# event bridge rule, target, connection, api destination
# ...
```

### Environment

```markdown
- OS: MacOS 12.5
- LocalStack: 1.3.1
```


### Anything else?

The AWS list buckets call works from within the pod, but not from the outside. Discussion with @bentsku can be found in slack [here](https://localstack-community.slack.com/archives/CMAFN2KSP/p1672768637503899)
"""
    Testing the new utils from ASF
    Some utils are duplicated, but it will be easier once we remove the old listener, we won't have to
    untangle and leave old functions around
    """
    
    
    
    
    
    
    def test_uses_host_address(self):
        host_header = s3_utils_asf.S3_VIRTUAL_HOST_FORWARDED_HEADER
        addresses = [
            ({host_header: f"https://aws.{LOCALHOST}:4566"}, False),
            
            ({host_header: f"https://aws.{LOCALHOST}.localstack.cloud:4566"}, True),
            ({host_header: f"https://{LOCALHOST}.aws:4566"}, False),
            ({host_header: f"https://{LOCALHOST}.swa:4566"}, False),
            ({host_header: f"https://swa.{LOCALHOST}:4566"}, False),
            ({host_header: "https://bucket.s3.localhost.localstack.cloud"}, True),
            ({host_header: "bucket.s3.eu-west-1.amazonaws.com"}, True),
            ({host_header: "https://s3.eu-west-1.localhost.localstack.cloud/bucket"}, False),
            ({host_header: "https://s3.eu-west-1.localhost.localstack.cloud/bucket/key"}, False),
            ({host_header: "https://s3.localhost.localstack.cloud/bucket"}, False),
            ({host_header: "https://bucket.s3.eu-west-1.localhost.localstack.cloud/key"}, True),
            (
                {
                    host_header: "https://bucket.s3.eu-west-1.localhost.localstack.cloud/key/key/content.png"
                },