<VirtualHost *:443>
    ServerName agrupa.brchad.com
    ProxyPreserveHost On
    ProxyPass        / http://localhost:3003/
    ProxyPassReverse / http://localhost:3003/
    RequestHeader set X-Forwarded-Proto "https"
    RequestHeader set X-Real-IP %{REMOTE_ADDR}s
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set Content-Security-Policy "frame-ancestors 'self'"
    <LocationMatch "^/(embed|player)\.html$">
        Header always unset X-Frame-Options
        Header always set Content-Security-Policy "frame-ancestors 'self' https://caiomga.com https://www.caiomga.com https://*.brchad.com https://brchad.com https://cruzadinha.com.br https://www.cruzadinha.com.br"
    </LocationMatch>
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile  /etc/letsencrypt/live/agrupa.brchad.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/agrupa.brchad.com/privkey.pem
    ErrorLog ${APACHE_LOG_DIR}/agrupa.brchad_error.log
    CustomLog ${APACHE_LOG_DIR}/agrupa.brchad_access.log combined
</VirtualHost>
