**Apache Airflow version**: 2.0.0


**Kubernetes version (if you are using kubernetes)** (use `kubectl version`): Kubernetes 1.20.2

**Environment**: Debian Buster image running in Kubernetes 1.20.2

- **Cloud provider or hardware configuration**: Ubuntu on VMware on premise
- **OS** (e.g. from /etc/os-release): Buster
- **Kernel** (e.g. `uname -a`):4.15.0-129-generic
- **Install tools**: Docker with a helm chart

**What happened**:  After enabling an SMTP back end and setting my DAG to notify on failure with

```
'email_on_failure': True,
'email_on_retry': True,
'email': '<my email>'
```

The email is sent and the Mark success portion fails with a 404

**What you expected to happen**: When clicking the Mark Success link, expect the link to mark the DAG as a success and forward on to some where in the Airflow UI


**How to reproduce it**: Enable email on your server and have a DAG that fails. Click the link in the email

As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.

Enable an SMTP connection for alerts. Use this DAG to always fail

Failure Dag:

```
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.bash_operator import BashOperator
from airflow.operators.python_operator import PythonOperator
from airflow.version import version
from datetime import datetime, timedelta

def error_function():
    raise Exception('Something wrong')

default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'email_on_failure': True,
    'email_on_retry': True,
    'email': '<your email>',
    'retries': 0,
    'retry_delay': timedelta(minutes=5)
}

with DAG('failure_dag',
         start_date=datetime(2019, 1, 1),
         max_active_runs=3,
         schedule_interval=timedelta(minutes=30),  # https://airflow.apache.org/docs/stable/scheduler.html#dag-runs
         default_args=default_args,
         catchup=False) as dag:

    t0 = PythonOperator(
    task_id='failing_task',
    python_callable=error_function
    )
```
Receive the email and then click the Mark Success link generated from the method [here](https://github.com/apache/airflow/blob/bc5ced3e54b3cf855808e04f09543159fd3fa79f/airflow/models/taskinstance.py#L531-L543)


**Anything else we need to know**:

How often does this problem occur: Every time the link is created in email
Possible Causes: The mark success view requires a POST request but the link produces a GET request.

@ephraimbuddy 
airflow/www/views.py
from airflow.utils.dates import infer_time_unit, scale_time_units
from airflow.utils.docs import get_docs_url
from airflow.utils.helpers import alchemy_to_dict
from airflow.utils.log import secrets_masker
from airflow.utils.log.log_reader import TaskLogReader
from airflow.utils.session import create_session, provide_session
from airflow.utils.state import State
from airflow.version import version
from airflow.www import auth, utils as wwwutils
from airflow.www.decorators import action_logging, gzipped
from airflow.www.forms import (
    ConnectionForm,
    DagRunEditForm,
    DagRunForm,
    DateTimeForm,
    DateTimeWithNumRunsForm,
    DateTimeWithNumRunsWithDagRunsForm,
    TaskInstanceEditForm,
)
from airflow.www.widgets import AirflowModelListWidget
PAGE_SIZE = conf.getint('webserver', 'page_size')
FILTER_TAGS_COOKIE = 'tags_filter'
FILTER_STATUS_COOKIE = 'dag_status_filter'
def truncate_task_duration(task_duration):
    """
    Cast the task_duration to an int was for optimization for large/huge dags if task_duration > 10s
    otherwise we keep it as a float with 3dp
    """
    return int(task_duration) if task_duration > 10.0 else round(task_duration, 3)
def get_safe_url(url):