# Base\_url\_no\_prefix actually base\_url\_no\_suffix?

**URL:** <https://meta.discourse.org/t/base-url-no-prefix-actually-base-url-no-suffix/94797>\
**Category:** Development\
**Created:** [15.Август.2018 13:49:28 UTC](https://meta.discourse.org/t/base-url-no-prefix-actually-base-url-no-suffix/94797 "2018-08-15T13:49:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)\
**Post date:** [15.Август.2018 13:49:29 UTC](https://meta.discourse.org/t/base-url-no-prefix-actually-base-url-no-suffix/94797/1 "2018-08-15T13:49:29Z")

</div>

Noticed this while cleaning up my CSP proof of concept:

`Discourse.base_url_no_prefix` seems to actually be the base url sans path (not protocol, as I would expect), compare `base_url_no_prefix` to `base_url` below:

> <https://github.com/discourse/discourse/blob/main/lib/discourse.rb#L250-L267>

So, I propose `base_url_no_prefix` is renamed `base_url_no_suffix` or `base_url_no_path` to clear up any future confusion.

---

_[View the full topic](https://meta.discourse.org/t/base-url-no-prefix-actually-base-url-no-suffix/94797)._
