CB5 - Multi site - feature to allow URL Path

Description

Hi Luis,

Just a question really. Will multi-site support different URL paths as well as domains. The reg-ex will accommodate but curious if we can create sites where we have the same domain but different path.

Example

Site 1 - globalsite.com/ca
Site 2 - globalsite.com/hk

Thanks!

Activity

Show:

Angus Johnson February 19, 2021 at 1:53 AM

Thanks Luis. I see quite a few commits. Let me know when it makes sense to test. Cheers

Luis Majano February 19, 2021 at 12:17 AM

This is done now. However, instead of going to the cgi scope, we abstract it to event.getFullUrl from the request context. This way, you can do mocking or have your own context decorator that can adapt to your needs.

Also helps when doing unit/integration tests, as we can swap site detection by just mocking that method.

Luis Majano February 1, 2021 at 8:28 PM

Ok, the security issues is realted to our upgrade to cbsecurity 2 and we have a ticket for this already:

I will update this ticket to address the cgi issue.

Luis Majano January 29, 2021 at 2:30 PM

Ok, I will investigate, we start our sprints on ContentBox next MOnday.

 

For both issues.

Angus Johnson January 29, 2021 at 1:40 AM

cgi.SERVER_NAME will only test the host name or ipaddress, ignoring the path.

I think we could test the regex against cgi.REQUEST_URL in that block and return the match.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Affects versions

Components

Priority

Sentry

Created January 20, 2021 at 12:33 AM
Updated February 19, 2021 at 1:53 AM
Resolved February 19, 2021 at 12:16 AM