Browse Source

Always generate action URLs from the base CP URL in headless mode

#5553
https://github.com/craftcms/cms/issues/6597#issuecomment-759146497
pull/7426/head
Brandon Kelly 5 years ago
parent
commit
52035a51e7
  1. 1
      CHANGELOG-v3.6.md
  2. 1
      CHANGELOG.md
  3. 2
      src/helpers/UrlHelper.php

1
CHANGELOG-v3.6.md

@ -132,6 +132,7 @@
- Field layout designers will no longer create a new tab if no tab name is entered in the prompt. ([#7333](https://github.com/craftcms/cms/issues/7333))
- Site URLs that are generated on the front-end of disabled sites now include the `siteToken` param, if one was passed to the current page. ([#7264](https://github.com/craftcms/cms/issues/7264))
- Mutex lock names are now prefixed with the application ID, to avoid lock conflicts if two Craft installs shared the same database. ([#7384](https://github.com/craftcms/cms/issues/7384))
- Action URLs are now always based on the control panel URL when running Craft in headless mode. ([#5553](https://github.com/craftcms/cms/issues/5553))
- Renamed the `backup` and `restore` commands to `db/backup` and `db/restore`. ([#7023](https://github.com/craftcms/cms/issues/7023))
- The `migrate/all` command now lists the migrations that will be applied. ([#7381](https://github.com/craftcms/cms/issues/7381))
- The `project-config/apply` command now displays a list of changes it is applying. ([#7235](https://github.com/craftcms/cms/issues/7235))

1
CHANGELOG.md

@ -36,6 +36,7 @@
- Field containers no longer set the `aria-describedby` attribute, leaving it up to the actual inputs to do so. ([#7365](https://github.com/craftcms/cms/issues/7365))
- Number field settings and input values are now fully formatted, unless the Preview Format setting is set to “Unformatted”.
- Mutex lock names are now prefixed with the application ID, to avoid lock conflicts if two Craft installs shared the same database. ([#7384](https://github.com/craftcms/cms/issues/7384))
- Action URLs are now always based on the control panel URL when running Craft in headless mode. ([#5553](https://github.com/craftcms/cms/issues/5553))
- The `migrate/all` command now lists the migrations that will be applied. ([#7381](https://github.com/craftcms/cms/issues/7381))
- The `project-config/apply` command now displays a list of changes it is applying. ([#7235](https://github.com/craftcms/cms/issues/7235))
- The `allowedFileExtensions` config setting now includes several file extensions used by caption and subtitle file formats by default. ([#7304](https://github.com/craftcms/cms/issues/7304))

2
src/helpers/UrlHelper.php

@ -342,7 +342,7 @@ class UrlHelper
$request = Craft::$app->getRequest();
if ($request->getIsCpRequest()) {
if ($generalConfig->headlessMode || $request->getIsCpRequest()) {
$path = static::prependCpTrigger($path);
$cpUrl = true;
} else {

Loading…
Cancel
Save