diff --git a/config/schema/fastly.schema.yml b/config/schema/fastly.schema.yml
index 2b6bb13..b16857f 100644
--- a/config/schema/fastly.schema.yml
+++ b/config/schema/fastly.schema.yml
@@ -8,3 +8,15 @@ fastly.settings:
     service_id:
       type: string
       label: 'Fastly Service ID'
+    purge_method:
+      type: string
+      label: 'Fastly Purge Method'
+    stale_while_revalidate_value:
+      type: integer
+      label: 'Fastly stale while revalidation value'
+    stale_if_error:
+      type: boolean
+      label: 'Fastly stale if error'
+    stale_if_error_value:
+      type: integer
+      label: 'Fastly stale if error value'
diff --git a/fastly.services.yml b/fastly.services.yml
index 8b066cb..5468662 100644
--- a/fastly.services.yml
+++ b/fastly.services.yml
@@ -15,6 +15,11 @@ services:
     arguments: ['@logger.channel.fastly']
     tags:
       - { name: event_subscriber }
+  fastly.cache_tags.add_soft_purge_headers:
+    class: Drupal\fastly\EventSubscriber\AddSoftPurgeHeaders
+    arguments: ['@logger.channel.fastly', '@config.factory']
+    tags:
+      - { name: event_subscriber }
   logger.channel.fastly:
     parent: logger.channel_base
     arguments: ['fastly']
diff --git a/src/Api.php b/src/Api.php
index c528729..6373e16 100644
--- a/src/Api.php
+++ b/src/Api.php
@@ -8,6 +8,7 @@
 namespace Drupal\Fastly;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\fastly\Form\FastlySettingsForm;
 use GuzzleHttp\ClientInterface;
 use GuzzleHttp\Exception\RequestException;
 use Psr\Log\LoggerInterface;
@@ -25,6 +26,13 @@ class Api {
   protected $logger;
 
   /**
+   * The purge method (instant / soft).
+   *
+   * @var string
+   */
+  private $purgeMethod;
+
+  /**
    * Constructs a \Drupal\fastly\Api object.
    *
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
@@ -41,6 +49,7 @@ class Api {
 
     $this->apiKey = $config->get('api_key');
     $this->serviceId = $config->get('service_id');
+    $this->purgeMethod = $config->get('purge_method');
 
     $this->host = $host;
     $this->httpClient = $http_client;
@@ -144,16 +153,19 @@ class Api {
 
         $result = $this->json($response);
         if ($result->status === 'ok') {
-          $this->logger->info('Successfully purged the key %key. Purge ID: %id.', [
+
+          $this->logger->info('Successfully purged the key %key. Purge ID: %id. Purge Method: %purge_method.', [
             '%key' => $key,
             '%id' => $result->id,
+            '%purge_method' => $this->purgeMethod,
           ]);
         }
         else {
-          $this->logger->critical('Unable to purge the key %key was purged from Fastly. Response status: %status. Purge ID: %id.', [
+          $this->logger->critical('Unable to purge the key %key was purged from Fastly. Response status: %status. Purge ID: %id. Purge Method: %purge_method.', [
             '%key' => $key,
             '%status' => $result->status,
             '%id' => $result->id,
+            '%purge_method' => $this->purgeMethod,
           ]);
         }
       }
@@ -187,6 +199,12 @@ class Api {
         $data['headers'] = $headers;
         $data['headers']['Accept'] = 'application/json';
         $data['headers']['Fastly-Key'] = $this->apiKey;
+
+        // If the module is configured to use soft purging, we need to add
+        // the appropriate header.
+        if ($this->purgeMethod == FastlySettingsForm::FASTLY_SOFT_PURGE) {
+          $data['headers']['Fastly-Soft-Purge'] = 1;
+        }
       }
       switch (strtoupper($method)) {
         case 'GET':
diff --git a/src/EventSubscriber/AddSoftPurgeHeaders.php b/src/EventSubscriber/AddSoftPurgeHeaders.php
new file mode 100644
index 0000000..5590937
--- /dev/null
+++ b/src/EventSubscriber/AddSoftPurgeHeaders.php
@@ -0,0 +1,84 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Fastly\EventSubscriber\CacheTagsHeaderLimitDetector.
+ */
+
+namespace Drupal\fastly\EventSubscriber;
+
+use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\fastly\Form\FastlySettingsForm;
+use Psr\Log\LoggerInterface;
+use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
+use Symfony\Component\HttpKernel\KernelEvents;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+class AddSoftPurgeHeaders implements EventSubscriberInterface {
+
+  /**
+   * The Fastly logger channel.
+   *
+   * @var \Psr\Log\LoggerInterface
+   */
+  protected $logger;
+
+  /**
+   * The config factory.
+   *
+   * @var \Drupal\Core\Config\ConfigFactoryInterface
+   */
+  protected $config;
+
+  /**
+   * Constructs a new CacheTagsHeaderLimitDetector object.
+   *
+   * @param \Psr\Log\LoggerInterface $logger
+   *   The Fastly logger channel.
+   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
+   *   The config factory.
+   *
+   */
+  public function __construct(LoggerInterface $logger, ConfigFactoryInterface $config_factory) {
+    $this->logger = $logger;
+    $this->config = $config_factory;
+  }
+
+  /**
+   * Adds Surrogate-Control header if soft purging is enabled.
+   *
+   * @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
+   *   The event to process.
+   */
+  public function onRespond(FilterResponseEvent $event) {
+    // Get the fastly settings from configuration.
+    $config = $this->config->get('fastly.settings');
+
+    // Only modify the master request.
+    if ((!$event->isMasterRequest()) || (!($config->get('purge_method') == FastlySettingsForm::FASTLY_SOFT_PURGE))) {
+      return;
+    }
+
+    // Get response.
+    $response = $event->getResponse();
+
+    // Build the Surrogate-Control header.
+    $surrogate_control_header = 'stale-while-revalidate=' . $config->get('stale_while_revalidate_value');
+
+    if ((bool) $config->get('stale_if_error')) {
+      $surrogate_control_header .= ', stale-if-error=' . $config->get('stale_if_error_value');
+    }
+
+    // Set the modified Cache-Control header.
+    $response->headers->set('Surrogate-Control', $surrogate_control_header);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getSubscribedEvents() {
+    $events[KernelEvents::RESPONSE][] = ['onRespond'];
+    return $events;
+  }
+
+}
diff --git a/src/Form/FastlySettingsForm.php b/src/Form/FastlySettingsForm.php
index fc2214a..1235cc6 100644
--- a/src/Form/FastlySettingsForm.php
+++ b/src/Form/FastlySettingsForm.php
@@ -18,6 +18,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 class FastlySettingsForm extends ConfigFormBase {
 
   /**
+   * Constants for the values of instant and soft purge methods.
+   */
+  const FASTLY_INSTANT_PURGE = 'instant';
+  const FASTLY_SOFT_PURGE = 'soft';
+
+  /**
    * The Fastly API.
    *
    * @var \Drupal\Fastly\Api
@@ -88,6 +94,60 @@ class FastlySettingsForm extends ConfigFormBase {
       '#suffix' => '</div>',
     );
 
+    $form['purge_method'] = [
+      '#type' => 'radios',
+      '#title' => $this->t('Purge method'),
+      '#description' => $this->t("Switch between Fastly's Instant-Purge and Soft-Purge methods."),
+      '#default_value' => $config->get('purge_method') ?: self::FASTLY_INSTANT_PURGE,
+      '#options' => [
+        self::FASTLY_INSTANT_PURGE => $this->t('Use instant purge'),
+        self::FASTLY_SOFT_PURGE => $this->t('Use soft purge'),
+      ],
+    ];
+
+    $form['purge'] = [
+      '#type' => 'details',
+      '#title' => $this->t('Soft purge options'),
+      '#open' => TRUE,
+      '#states' => [
+        'invisible' => [
+          ':input[name="purge_method"]' => ['value' => self::FASTLY_INSTANT_PURGE,],
+        ],
+        'required' => [
+          ':input[name="purge_method"]' => ['value' => self::FASTLY_SOFT_PURGE,],
+        ],
+      ],
+    ];
+
+    $form['purge']['stale_while_revalidate_value'] = [
+      '#type' => 'number',
+      '#title' => $this->t('Stale while revalidate'),
+      '#description' => $this->t('The number in seconds to show stale content while cache revalidation.'),
+      '#default_value' => $config->get('stale_while_revalidate_value') ?: 604800,
+    ];
+
+    $form['purge']['stale_if_error'] = [
+      '#type' => 'checkbox',
+      '#title' => $this->t('Stale if error'),
+      '#description' => $this->t("Activate the stale-if-error tag for serving stale content if the origin server becomes unavailable."),
+      '#default_value' => $config->get('stale_if_error'),
+    ];
+
+    $form['purge']['stale_if_error_value'] = [
+      '#type' => 'number',
+//      '#title' => $this->t('Stale if error'),
+      '#description' => $this->t('The number in seconds to show stale content if the origin server becomes unavailable.'),
+      '#default_value' => $config->get('stale_if_error_value') ?: 604800,
+      '#states' => [
+        'invisible' => [
+          ':input[name="stale_if_error"]' => ['checked' => FALSE,],
+        ],
+        'required' => [
+          ':input[name="stale_if_error"]' => ['checked' => TRUE,],
+        ],
+      ],
+    ];
+
     return parent::buildForm($form, $form_state);
   }
 
@@ -114,6 +174,10 @@ class FastlySettingsForm extends ConfigFormBase {
     $this->config('fastly.settings')
       ->set('api_key', $form_state->getValue('api_key'))
       ->set('service_id', $form_state->getValue('service_id'))
+      ->set('purge_method', $form_state->getValue('purge_method'))
+      ->set('stale_while_revalidate_value', $form_state->getValue('stale_while_revalidate_value'))
+      ->set('stale_if_error', $form_state->getValue('stale_if_error'))
+      ->set('stale_if_error_value', $form_state->getValue('stale_if_error_value'))
       ->save();
 
     parent::submitForm($form, $form_state);
