Check out the Red programming language from the same author

Allow-cors

ALLOW-CORS

SYNTAX: allow-cors [<parameters>] from <origin>


<parameters>:

  • cookies : instruct client that cookies are allowed (optional, default to block them)
  • headers [<header1> <header2> ...] : list of allowed response headers (optional, default to all)
  • methods [<method1> <method2> ...] : list of allowed methods (optional, default to all)

<origin>:

  • * : any domain
  • domain.com : a given domain name (word! or string! value)

NOTE: multiple allow-cors directives can be specified for a given virtual host, first ones will take priority in case of ambiguity.

EXAMPLES:

  • shortest example:
    allow-cors [] from *
  • restricted to a given domain:
    allow-cors [cookies method [PUT DELETE]] from red-lang.org


Page last modified on August 12, 2013, at 03:18 PM
Powered by Cheyenne Web Server - © Softinnov