# Discourse on iOS devices is not loading properly when enabling password protection

**URL:** https://meta.discourse.org/t/discourse-on-ios-devices-is-not-loading-properly-when-enabling-password-protection/185979
**Category:** Support
**Created:** [April 7, 2021, 8:58pm UTC](https://meta.discourse.org/t/discourse-on-ios-devices-is-not-loading-properly-when-enabling-password-protection/185979 "2021-04-07T20:58:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![trying2survive](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@trying2survive](https://meta.discourse.org/u/trying2survive)
#### Post date: [April 7, 2021, 8:58pm UTC](https://meta.discourse.org/t/discourse-on-ios-devices-is-not-loading-properly-when-enabling-password-protection/185979/1 "2021-04-07T20:58:24Z")

</div>

Hello. When enabling password protection on Discourse following either this [[1]](https://meta.discourse.org/t/how-to-password-protect-staging-environment/161641/18) or this [[2]](https://meta.discourse.org/t/restrict-access-to-your-discourse-site-with-http-basic-authentication/168192), the site is loading fine on desktop and on Android devices (after entering user and password). However, the site loads like this when browsing on iOS devices:

 ![IMG_4021](https://global.discourse-cdn.com/meta/original/3X/3/b/3b831d275e80a14c69b58198b5e7483867aa2a19.jpeg)  
  
  
Since it is only being encountered on iOS devices, it could be something related to the CDN (CloudFront). The following is the cache and origin request policy:  
  
  
 ![Screen Shot 2021-03-29 at 4.06.10 PM](https://global.discourse-cdn.com/meta/original/3X/e/3/e3d308d97a07e0adea209aa1de654d69ee5e490f.png)  
  
  
This “whitelist-authorization-headers” policy – [[1]](https://meta.discourse.org/t/how-to-password-protect-staging-environment/161641/18) stated that authorization header needs to be whitelisted:  
  
  
 ![Screen Shot 2021-03-29 at 4.14.52 PM](https://global.discourse-cdn.com/meta/original/3X/5/a/5a77a9325316bdcf6dcf9a696c5cc3475c43db71.png)  
  
  
Do you guys have any idea if the issue is related to just the CDN or could there be something else in Discourse’s config files that need to be updated? Hoping for a response. Thank you.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 7, 2021, 9:03pm UTC](https://meta.discourse.org/t/discourse-on-ios-devices-is-not-loading-properly-when-enabling-password-protection/185979/2 "2021-04-07T21:03:24Z")

</div>

> [@Restrict access to your Discourse site with HTTP Basic Authentication](https://meta.discourse.org/t/restrict-access-to-your-discourse-site-with-http-basic-authentication/168192/1):
>
> NOTE: I have had some trouble with basic-auth recently in which some static assets weren’t getting loaded. It might be easier to just configure your site for `login_required` by adding `DISCOURSE_LOGIN_REQUIRED: true` in the `env` section of your `app.yml` .

I think that it won’t work because the browser isn’t quite playing by the same rules that the web server is.

If you know how to get your phone to override DNS, you could remove the publie DNS record for the site (then no one could access it), and tell only your phone to use your private DNS. I don’t know how to do that. You’d google something like “ios DNS spoof”.

Or, you can let login-required be good enough for your testing.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 7, 2021, 9:03pm UTC](https://meta.discourse.org/t/discourse-on-ios-devices-is-not-loading-properly-when-enabling-password-protection/185979/3 "2021-05-07T21:03:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
