I added Fastly CDN to my site, and now when I try to log into the admin section, it will redirect to site.herokuapp.com/site/login instead of www.site.com/site/login. I suppose this is because Fastly is requesting the page on the backend with HOST: site.herokuapp.com
. Is there a setting in Yii to change the host name in production so it redirects to the correct domain? I tried searching the docs for 'domain' or 'host' but could not find any relevant settings. These were the closest docs I could find.
http://www.yiiframework.com/doc-2.0/guide-security-authorization.html
http://www.yiiframework.com/doc-2.0/yii-web-user.html#loginRequired()-detail
http://www.yiiframework.com/doc-2.0/yii-web-user.html#$loginUrl-detail