from typing import Dict
import json


def cors_web_response(status_code: int, body: Dict[str, str]):
    """Create a response when dealing with CORS."""
    return {
        'statusCode': status_code,
        'headers': {
            'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,X-Amz-Security-Token,Authorization,X-Api-Key,'
                                            'X-Requested-With,Accept,Access-Control-Allow-Methods,'
                                            'Access-Control-Allow-Origin,Access-Control-Allow-Headers',
            "Access-Control-Allow-Methods": 'OPTIONS,POST',
            'Access-Control-Allow-Origin': '*',
            'X-Requested-With': '*'
    },
        'body': json.dumps(body)
    }