Tartalomjegyzék

< PHP

PHP Cross Origin

Bárhonnan jöhet kérés

<?php
 
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
header('Access-Control-Allow-Headers: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');

Domain

<?php
 
header('Access-Control-Allow-Origin: https://zold.lan');
header('Content-Type: application/json');
header('Access-Control-Allow-Headers: https://zold.lan');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');