aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRichard van Nieuwenhoven <richard.vannieuwenhoven@adesso.at>2015-09-13 08:01:26 +0200
committerRichard van Nieuwenhoven <richard.vannieuwenhoven@adesso.at>2015-09-13 08:01:26 +0200
commit4a3649d01c41f5cba8dd4c8b3c99d2e073395ff8 (patch)
tree0b2ee99ebe3155aa2bc533817f55fb1be8ac123b /README.md
parent52e133eaffa4906f4d85ec1374c99ee475ead36d (diff)
parentcbdd9d819348d2169d190f305b32d5240d1f60fc (diff)
downloadnanohttpd-4a3649d01c41f5cba8dd4c8b3c99d2e073395ff8.tar.gz
Merge pull request #207 from McFoggy/cors-support
fixes #25 add basic CORS support
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index 80ef93c..e1f5484 100644
--- a/README.md
+++ b/README.md
@@ -121,6 +121,19 @@ NanoHTTPD project currently consist of four parts:
* File server serves also very long files without memory overhead.
* Contains a built-in list of most common MIME types.
* Runtime extension support (extensions that serve particular MIME types) - example extension that serves Markdown formatted files. Simply including an extension JAR in the webserver classpath is enough for the extension to be loaded.
+* Simple [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) support via `--cors` paramater
+ * by default serves `Access-Control-Allow-Headers: origin,accept,content-type`
+ * possibility to set `Access-Control-Allow-Headers` by setting System property: `AccessControlAllowHeader`
+ * _example: _ `-DAccessControlAllowHeader=origin,accept,content-type,Authorization`
+ * possible values:
+ * `--cors`: activates CORS support, `Access-Control-Allow-Origin` will be set to `*`
+ * `--cors=some_value`: `Access-Control-Allow-Origin` will be set to `some_value`.
+
+**_CORS argument examples_**
+
+
+* `--cors=http://appOne.company.com`
+* `--cors="http://appOne.company.com, http://appTwo.company.com"`: note the double quotes so that the 2 URLs are considered part of a single argument.
## Maven dependencies