# 403 Error with digital ocean cdn

**URL:** https://meta.discourse.org/t/403-error-with-digital-ocean-cdn/172934
**Category:** Support
**Created:** [December 10, 2020, 11:23pm UTC](https://meta.discourse.org/t/403-error-with-digital-ocean-cdn/172934 "2020-12-10T23:23:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Pierre](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pierre/32/36467_2.png) [@Pierre](https://meta.discourse.org/u/Pierre)
#### Post date: [December 10, 2020, 11:23pm UTC](https://meta.discourse.org/t/403-error-with-digital-ocean-cdn/172934/1 "2020-12-10T23:23:41Z")

</div>

I’m not sure if this is related so decided to create another post

Successfully connected Discourse with digital ocean spaces (I think)  
[https://meta.discourse.org/t/looking-for-doc-to-connect-discourse-with-digital-ocean-spaces/172917/8](https://meta.discourse.org/t/looking-for-doc-to-connect-discourse-with-digital-ocean-spaces/172917/8)

and there’s an option within the ‘do spaces settings’ to enable cdn. After enabling and visiting Discourse I see many 403 errors pointing to the following urls

[https://cdn.example.com/assets/](https://cdn.example.com/assets/)\*  
[https://cdn.exameplc.om/stylesheets/](https://cdn.exameplc.om/stylesheets/)\*  
[https://cdn.example.com/uploads/](https://cdn.example.com/uploads/)\*

Did I miss something?

---

<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: [December 11, 2020, 3:02am UTC](https://meta.discourse.org/t/403-error-with-digital-ocean-cdn/172934/2 "2020-12-11T03:02:57Z")

</div>

There’s this

> [@Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916/1):
>
> DO offering is good and works out of the box. Only problem is that their CDN offering is awfully broken, so you need to use a different CDN for the files.

Which I think you’ve confirmed.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [December 11, 2020, 5:38am UTC](https://meta.discourse.org/t/403-error-with-digital-ocean-cdn/172934/3 "2020-12-11T05:38:05Z")

</div>

Their CDN is “broken” because it sends incorrect headers, not because it returns Forbidden responses.

@Pierre so it does work without CDN?  
If so, how did you configure the CDN?

---

<div class="post-metadata">

### Author: ![Pierre](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pierre/32/36467_2.png) [@Pierre](https://meta.discourse.org/u/Pierre)
#### Post date: [December 11, 2020, 1:52pm UTC](https://meta.discourse.org/t/403-error-with-digital-ocean-cdn/172934/4 "2020-12-11T13:52:38Z")

</div>

Hi @pfaffman I found your post which also mentions the 403 error. It’s marked as closed.

> [@Digital Ocean Spaces don’t implement the AWS S3 API for the CORS rule](https://meta.discourse.org/t/digital-ocean-spaces-don-t-implement-the-aws-s3-api-for-the-cors-rule/111736/5):
>
> No, I really mean assets (uploads seem fine). It seems that when GlobalSettings.s3\_cdn\_url is defined, discourse expects assets (i.e., the javascript stuff) to be in the S3 CDN, so the site is broken because none of the assets are available. It makes zero sense to me either. frowning_face I just set SiteSettings.s3\_cdn\_url (not in GlobalSettings) and assets seem to still be coming from the server, not the CDN. So maybe it’s a bug with GlobalSettings.s3\_cdn\_url? Yup. Re-setting the value in…

Can you share how the error was resolved?

---

<div class="post-metadata">

### Author: ![Pierre](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pierre/32/36467_2.png) [@Pierre](https://meta.discourse.org/u/Pierre)
#### Post date: [December 11, 2020, 2:00pm UTC](https://meta.discourse.org/t/403-error-with-digital-ocean-cdn/172934/5 "2020-12-11T14:00:15Z")

</div>

Hi @michaeld

To be honest I’m not even sure if things are working correctly. I’ve been struggling with different configurations and there have been many changes trying to get Discorse to work with Digital Ocean Spaces. I will need to do a clean install.

---

<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: [December 11, 2020, 2:41pm UTC](https://meta.discourse.org/t/403-error-with-digital-ocean-cdn/172934/6 "2020-12-11T14:41:04Z")

</div>

Sorry. I may not have paid close enough attention to your specifics.

The problem that I believe I had in that topic, which cost me 17 hours of down time for a high priority client during my vacation, is solved by adding the s3:upload assets to the app.yml.,and, I think, using the env variables to configure the S3 stuff. Did you do that?
