
from django.shortcuts import render


def intro(request, template='intro.html'):
    response = render(request, template)
    response['X-Frame-Options'] = 'SAMEORIGIN'

    return response

from django.shortcuts import render
from django.views.decorators.clickjacking import xframe_options_sameorigin


@xframe_options_sameorigin
def intro(request, template='intro.html'):
    response = render(request, template)
    return response

Use X-Frame-Options decorator to override middleware.
Use X-Frame-Options decorator to override middleware.

- 
  from django.shortcuts import render
+ from django.views.decorators.clickjacking import xframe_options_sameorigin
  
  
+ @xframe_options_sameorigin
  def intro(request, template='intro.html'):
      response = render(request, template)
-     response['X-Frame-Options'] = 'SAMEORIGIN'
- 
      return response
  
Use X-Frame-Options decorator to override middleware.
## Code Before:

from django.shortcuts import render


def intro(request, template='intro.html'):
    response = render(request, template)
    response['X-Frame-Options'] = 'SAMEORIGIN'

    return response

## Instruction:
Use X-Frame-Options decorator to override middleware.
## Code After:
from django.shortcuts import render
from django.views.decorators.clickjacking import xframe_options_sameorigin


@xframe_options_sameorigin
def intro(request, template='intro.html'):
    response = render(request, template)
    return response
