enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
202 stars 34 forks source link

Site baseUrl #10349

Open rymsha opened 11 months ago

rymsha commented 11 months ago

Site baseUrl stored in siteConfig under "system" application key: com.enonic.xp.site

"data": {
    "siteConfig": [
      {
        "applicationKey": "com.enonic.xp.site",
        "config": { "baseUrl": "https://www.example.com:8443/my-site" }
        ...

Can be used for various purposes, similar to how html <base> element used for, but on backend. (although domain part is always required)

Examples of baseUrl:

https://www.example.com:8443/my-site

www.example.com (equivalent to //www.example.com)

www.exaple.com/my-site (equivalent to //www.example.com/my-site)

http://www.example.com

http://www.example.com:8080

https://www.example.com:8443

https://enonic.atlassian.net/wiki/spaces/TD/pages/2743304247/Site+base+URL

rymsha commented 11 months ago

When implemented, CS should be adjusted to ignore com.enonic.xp.site applicationKey