# Markdown JS with two protocols

**URL:** <https://meta.discourse.org/t/markdown-js-with-two-protocols/176523>\
**Category:** Self-hosting\
**Created:** [January 19, 2021, 6:59am UTC](https://meta.discourse.org/t/markdown-js-with-two-protocols/176523 "2021-01-19T06:59:56Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [February 3, 2021, 6:51pm UTC](https://meta.discourse.org/t/markdown-js-with-two-protocols/176523/11 "2021-02-03T18:51:37Z")

</div>

Something weird about your setup.

You have a S3 CDN setup, but it is on the same URL as the bucket?

```plaintext
data-s3-cdn="https://discourse-dev.assets.schwarz" 
data-s3-base-url="//discourse-dev.assets.schwarz"

```

Comparing with Meta:

```plaintext
data-s3-cdn="https://d11a6trkgmumsb.cloudfront.net" 
data-s3-base-url="//assets-meta-cdck-prod-meta.s3.dualstack.us-west-1.amazonaws.com"

```

The code that load dynamic scripts will try to replace the `S3_BASE_URL` for `S3_CDN`:

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse-common/addon/lib/get-url.js#L35-L37](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse-common/addon/lib/get-url.js#L35-L37)

---

_[View the full topic](https://meta.discourse.org/t/markdown-js-with-two-protocols/176523)._
