Index: modules/contrib/subpathauto/subpathauto.install
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/contrib/subpathauto/subpathauto.install	(revision )
+++ modules/contrib/subpathauto/subpathauto.install	(revision )
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Add fruit to the default configuration for example.module.
+ */
+function subpathauto_update_8001() {
+  $config_factory = \Drupal::configFactory();
+  $config = $config_factory->getEditable('subpathauto.settings');
+  $config->set('admin_route_validation', true);
+  $config->save(TRUE);
+}
Index: modules/contrib/subpathauto/src/PathProcessor.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/contrib/subpathauto/src/PathProcessor.php	(revision c125bfd853bf2ef427df6a3ea1a68e2ff0632d9c)
+++ modules/contrib/subpathauto/src/PathProcessor.php	(revision )
@@ -9,6 +9,7 @@
 use Drupal\Core\PathProcessor\InboundPathProcessorInterface;
 use Drupal\Core\PathProcessor\OutboundPathProcessorInterface;
 use Drupal\Core\Render\BubbleableMetadata;
+use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
@@ -117,7 +118,7 @@
    * {@inheritdoc}
    */
   public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleableMetadata = NULL) {
-    if (isset($options['absolute']) && $options['absolute']) {
+    if ((isset($options['absolute']) && $options['absolute']) || $this->validateAdminRoute($path)) {
       return $path;
     }
     $original_path = $path;
@@ -181,6 +182,31 @@
   }
 
   /**
+   * Tests if path refers to a route marked as an admin route.
+   *
+   * @param string $path
+   *   The path to be checked.
+   *
+   * @return bool
+   *   Whether path is an admin route or not.
+   */
+  protected function validateAdminRoute($path) {
+    // Continue validating if the setting to validate is set.
+    if($this->configFactory->get('subpathauto.settings')->get('admin_route_validation')) {
+      $request = Request::create($path);
+      $route_match = \Drupal::service('router.no_access_checks')
+        ->matchRequest($request);
+      $route = $route_match[RouteObjectInterface::ROUTE_OBJECT];
+      $is_admin = \Drupal::service('router.admin_context')
+        ->isAdminRoute($route);
+
+      return $is_admin;
+    }
+
+    return FALSE;
+  }
+
+  /**
    * Gets the path validator.
    *
    * @return \Drupal\Core\Path\PathValidatorInterface
@@ -217,6 +243,15 @@
    */
   protected function getMaxDepth() {
     return $this->configFactory->get('subpathauto.settings')->get('depth');
+  }
+
+  /**
+   * Gets the max depth that subpaths should be scanned through.
+   *
+   * @return int
+   */
+  protected function getAdminRouteValidation() {
+    return $this->configFactory->get('subpathauto.settings')->get('admin_route_validation');
   }
 
 }
Index: modules/contrib/subpathauto/config/install/subpathauto.settings.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/contrib/subpathauto/config/install/subpathauto.settings.yml	(revision c125bfd853bf2ef427df6a3ea1a68e2ff0632d9c)
+++ modules/contrib/subpathauto/config/install/subpathauto.settings.yml	(revision )
@@ -1,1 +1,2 @@
 depth: 0
+admin_route_validation: true
\ No newline at end of file
Index: modules/contrib/subpathauto/config/schema/subpathauto.schema.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/contrib/subpathauto/config/schema/subpathauto.schema.yml	(revision c125bfd853bf2ef427df6a3ea1a68e2ff0632d9c)
+++ modules/contrib/subpathauto/config/schema/subpathauto.schema.yml	(revision )
@@ -5,3 +5,6 @@
     depth:
       type: integer
       label: 'Maximum depth of sub-paths to alias'
+    admin_route_validation:
+      type: boolean
+      label: 'Validation on admin routes'
Index: modules/contrib/subpathauto/src/Form/SettingsForm.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/contrib/subpathauto/src/Form/SettingsForm.php	(revision c125bfd853bf2ef427df6a3ea1a68e2ff0632d9c)
+++ modules/contrib/subpathauto/src/Form/SettingsForm.php	(revision )
@@ -25,6 +25,13 @@
       '#description' => $this->t('Increasing this value may decrease performance.'),
     ];
 
+    $form['admin_route_validation'] = [
+      '#type' => 'checkbox',
+      '#title' => $this->t('If validation of admin routes is wanted'),
+      '#default_value' => $config->get('admin_route_validation'),
+      '#description' => $this->t('This will enable routes like node/[id]/edit to also be altered.'),
+    ];
+
     return parent::buildForm($form, $form_state);
   }
 
@@ -35,6 +42,7 @@
     $values = $form_state->getValues();
     $this->config('subpathauto.settings')
       ->set('depth', $values['depth'])
+      ->set('admin_route_validation', $values['admin_route_validation'])
       ->save();
 
     parent::submitForm($form, $form_state);
