To enable Cross-Origin Resource Sharing (CORS) in an .htaccess file, you can add the following lines: