SproutCMS

This is the code documentation for the SproutCMS project

class Cors

Cross Origin Resource Sharing.

TODO conditional safe headers: content-type, accept, accept-language, content-language
TODO conditional safe is unsafe: >128 characters
TODO restricting origins
TODO support for max-age, caching 'options' requests

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2024-05-05
**/
class NewClassName extends Cors {
    
    /**
    * Handling a CORS request.
    * 
    * This is a work-in-progress. CORS is a big thing so there's some edge
    * cases that this doesn't yet handle.
    **/
    public function handleCors (array $config) {
        // Method code goes here
    }
    
}
?>