mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-11 16:34:01 +02:00
Minor changes.
This commit is contained in:
@@ -78,7 +78,7 @@ class Context {
|
||||
|
||||
public function is_info_request() {
|
||||
|
||||
return Util::starts_with($this->setup->get('REQUEST_HREF') . '/', $this->setup->get('H5AI_HREF'));
|
||||
return Util::starts_with($this->setup->get('REQUEST_HREF') . '/', $this->setup->get('PUBLIC_HREF'));
|
||||
}
|
||||
|
||||
public function to_href($path, $trailing_slash = true) {
|
||||
@@ -147,7 +147,11 @@ class Context {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($path === $this->setup->get('H5AI_PATH') || strpos($path, $this->setup->get('H5AI_PATH') . '/') === 0) {
|
||||
if (strpos($path, $this->setup->get('PUBLIC_PATH')) === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strpos($path, $this->setup->get('PRIVATE_PATH')) === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ describe('view', function () {
|
||||
this.storeKey = '_h5ai';
|
||||
this.xConfig = {
|
||||
setup: {
|
||||
H5AI_HREF: util.uniqPath('-H5AI/'),
|
||||
PUBLIC_HREF: util.uniqPath('-PUBLIC/'),
|
||||
ROOT_HREF: util.uniqPath('-ROOT/')
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user