# Shopware hinter Reverse Proxy nutzt http statt https

**URL:** <https://forum.shopware.com/t/shopware-hinter-reverse-proxy-nutzt-http-statt-https/101323>\
**Category:** Administration\
**Created:** [20. September 2023 um 19:59 UTC](https://forum.shopware.com/t/shopware-hinter-reverse-proxy-nutzt-http-statt-https/101323 "2023-09-20T19:59:27Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![nets](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nets](https://forum.shopware.com/u/nets)\
**Post date:** [10. April 2024 um 10:01 UTC](https://forum.shopware.com/t/shopware-hinter-reverse-proxy-nutzt-http-statt-https/101323/9 "2024-04-10T10:01:48Z")

</div>

Ich habe jetzt wieder den Fehler, dass Inhalte über http angefordert werden statt https, obwohl ich in der

```auto
# config/packages/framework.yaml
framework:
    # ...
    # the IP address (or range) of your proxy
    trusted_proxies: '0.0.0.0/0'
    # trust *all* "X-Forwarded-*" headers
    trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix']
    # or, if your proxy instead uses the "Forwarded" header
    #trusted_headers: ['forwarded']

```

gesetzt habe und in der `.env.local`

```auto
APP_SECRET=<redacted>
APP_URL=https://shop3.vanill.at
DATABASE_URL=mysql://shopwaredbuser:<redacted>@lcmp-mysql-3:3306/shopwaredb
COMPOSER_HOME=/var/www/html/var/cache/composer
#INSTANCE_ID=<redacted>
BLUE_GREEN_DEPLOYMENT=0
OPENSEARCH_URL=http://localhost:9200
ADMIN_OPENSEARCH_URL=http://localhost:9200
TRUSTED_PROXIES=0.0.0.0/0
TRUSTED_DOMAINS=shop3.vanill.at
TRUSTED_HEADERS='["x-forwarded-for", "x-forwarded-host", "x-forwarded-proto", "x-forwarded-port", "x-forwarded-prefix"]'

```

sowie in der `.env`

```auto
###> shopware/core ###
APP_ENV=prod
APP_URL=https://127.0.0.1:8000
APP_SECRET=<redacted>
INSTANCE_ID=<redacted>
BLUE_GREEN_DEPLOYMENT=0
DATABASE_URL=mysql://root:root@localhost/shopware
# With Shopware 6.4.17.0 the MAILER_DSN variable will be used in this template instead of MAILER_URL
MAILER_URL=null://null
###< shopware/core ###

TRUSTED_PROXIES=0.0.0.0/0
TRUSTED_DOMAINS=shop3.vanill.at
TRUSTED_HEADERS='["x-forwarded-for", "x-forwarded-host", "x-forwarded-proto", "x-forwarded-port", "x-forwarded-prefix"]'

###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
# doctrine://default?auto_setup=0
###< symfony/messenger ###

###> symfony/mailer ###
# MAILER_DSN=null://null
###< symfony/mailer ###

###> symfony/lock ###
# Choose one of the stores below
# postgresql+advisory://db_user:db_password@localhost/db_name
LOCK_DSN=flock
###< symfony/lock ###

###> shopware/elasticsearch ###
OPENSEARCH_URL=http://localhost:9200
SHOPWARE_ES_ENABLED=0
SHOPWARE_ES_INDEXING_ENABLED=0
SHOPWARE_ES_INDEX_PREFIX=sw
SHOPWARE_ES_THROW_EXCEPTION=1
###< shopware/elasticsearch ###

###> shopware/storefront ###
STOREFRONT_PROXY_URL=https://localhost
SHOPWARE_HTTP_CACHE_ENABLED=1
SHOPWARE_HTTP_DEFAULT_TTL=7200
###< shopware/storefront ###

```

So sieht das `Caddyfile` aus

```auto
:80 {
    encode gzip zstd
    root * /var/www/html/public
    php_fastcgi php-lcmp3:9000 {
        trusted_proxies private_ranges
    }
    file_server
    header {
        -server
        -Link
        -X-Powered-By

        # disable FLoC tracking
        #Permissions-Policy interest-cohort=()

        # enable HSTS
        Strict-Transport-Security max-age=31536000;

        # disable clients from sniffing the media type
        X-Content-Type-Options nosniff

        # clickjacking protection
        X-Frame-Options DENY

       # keep referrer data off of HTTP connections
       Referrer-Policy no-referrer-when-downgrade
    }

    log
}

```

Ich habe echt keine Ahnung mehr, woran das jetzt noch liegen könnte.

---

_[View the full topic](https://forum.shopware.com/t/shopware-hinter-reverse-proxy-nutzt-http-statt-https/101323)._
