Skip to content

Commit

Permalink
CONTENTBOX-1156 #resolve
Browse files Browse the repository at this point in the history
CB5 - Multi site - feature to allow URL Path
  • Loading branch information
lmajano committed Feb 19, 2021
1 parent 56ec846 commit d091ee2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions index.cfm
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<!---
<!---
********************************************************************************
ContentBox - A Modular Content Platform
Copyright 2012 by Luis Majano and Ortus Solutions, Corp
www.ortussolutions.com
********************************************************************************
Apache License, Version 2.0
Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp]
Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
********************************************************************************
--->
Expand Down
4 changes: 2 additions & 2 deletions modules/contentbox/models/system/SiteService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ component
return newCriteria().isEq( "slug", event.getValue( "siteSlug" ) ).get();
}

// Try to discover using the cgi.server_name
// Try to discover using the requested full URL including host + path + query string for added flexibility
var matchedSite = getAllFlat().filter( function( thisSite ){
return reFindNoCase( thisSite[ "domainRegex" ], cgi.SERVER_NAME );
return reFindNoCase( thisSite[ "domainRegex" ], event.getFullUrl() );
} );

// Return the first matched site
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/sql/mysql/contentbox.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ LOCK TABLES `cb_site` WRITE;

INSERT INTO `cb_site` (`siteId`, `createdDate`, `modifiedDate`, `isDeleted`, `name`, `slug`, `description`, `domainRegex`, `keywords`, `tagline`, `homepage`, `isBlogEnabled`, `isSitemapEnabled`, `poweredByHeader`, `adminBar`, `isSSL`, `activeTheme`, `notificationEmails`, `notifyOnEntries`, `notifyOnPages`, `notifyOnContentStore`, `domain`)
VALUES
(1,'2020-09-09 17:16:59','2020-09-10 11:07:25',0,'Default Site','default','My Awesome Site','.*','','My Awesome Site','support',1,1,1,1,0,'default','[email protected]',1,1,1,'127.0.0.1'),
(1,'2020-09-09 17:16:59','2020-09-10 11:07:25',0,'Default Site','default','My Awesome Site','127\.0\.0\.1','','My Awesome Site','support',1,1,1,1,0,'default','[email protected]',1,1,1,'127.0.0.1'),
(2,'2021-02-18 17:44:50','2021-02-18 17:44:50',0,'Development Site','development','A development site','localhost','','','cbBlog',1,1,1,1,0,'default','',1,1,1,'localhost');

/*!40000 ALTER TABLE `cb_site` ENABLE KEYS */;
Expand Down

0 comments on commit d091ee2

Please sign in to comment.