{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"_layouts","path":"_layouts","contentType":"directory"},{"name":"css","path":"css","contentType":"directory"},{"name":"img","path":"img","contentType":"directory"},{"name":"js","path":"js","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"CNAME","path":"CNAME","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"_config.yml","path":"_config.yml","contentType":"file"},{"name":"build.sh","path":"build.sh","contentType":"file"},{"name":"client.html","path":"client.html","contentType":"file"},{"name":"index.html","path":"index.html","contentType":"file"},{"name":"resources.html","path":"resources.html","contentType":"file"},{"name":"server.html","path":"server.html","contentType":"file"},{"name":"server_apache.html","path":"server_apache.html","contentType":"file"},{"name":"server_appengine.html","path":"server_appengine.html","contentType":"file"},{"name":"server_aspnet.html","path":"server_aspnet.html","contentType":"file"},{"name":"server_awsapigateway.html","path":"server_awsapigateway.html","contentType":"file"},{"name":"server_caddy.html","path":"server_caddy.html","contentType":"file"},{"name":"server_caddy2.html","path":"server_caddy2.html","contentType":"file"},{"name":"server_cgi.html","path":"server_cgi.html","contentType":"file"},{"name":"server_coldfusion.html","path":"server_coldfusion.html","contentType":"file"},{"name":"server_expressjs.html","path":"server_expressjs.html","contentType":"file"},{"name":"server_flask.html","path":"server_flask.html","contentType":"file"},{"name":"server_iis6.html","path":"server_iis6.html","contentType":"file"},{"name":"server_iis7.html","path":"server_iis7.html","contentType":"file"},{"name":"server_meteor.html","path":"server_meteor.html","contentType":"file"},{"name":"server_nginx.html","path":"server_nginx.html","contentType":"file"},{"name":"server_perl.html","path":"server_perl.html","contentType":"file"},{"name":"server_php.html","path":"server_php.html","contentType":"file"},{"name":"server_spring-boot_kotlin.html","path":"server_spring-boot_kotlin.html","contentType":"file"},{"name":"server_tomcat.html","path":"server_tomcat.html","contentType":"file"},{"name":"server_virtuoso.html","path":"server_virtuoso.html","contentType":"file"},{"name":"server_wcf.html","path":"server_wcf.html","contentType":"file"}],"totalCount":34}},"fileTreeProcessingTime":6.3216790000000005,"foldersToFetch":[],"repo":{"id":5952711,"defaultBranch":"gh-pages","name":"enable-cors.org","ownerLogin":"monsur","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2012-09-25T16:13:27.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/81861?v=4","public":true,"private":false,"isOrgOwned":false},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"gh-pages","listCacheKey":"v0:1384889818.0","canEdit":false,"refType":"branch","currentOid":"98fe09082f67877e87b6f65678f6571d33ef15e6"},"path":"server_caddy.html","currentUser":null,"blob":{"rawLines":["---","layout: default","title: enable cross-origin resource sharing on caddyserver","---","","
"," To add the CORS authorization to the header using Caddy 1, simply add the following line inside your caddyfile:"," \t
"," \tcors","
"," This will allow all resources to be accessed from every domain.","
",""," You can also be more specific, i.e. allow specific resources to specific domains:","
"," \tcors /foo http://mysite.com http://anothertrustedsite.com","
"," There are many more options you can use, here is a full example, as shown in the"," caddyserver docs:","
",""," \t","cors / {"," origin http://allowedSite.com"," origin http://anotherSite.org https://anotherSite.org"," methods POST,PUT"," allow_credentials false"," max_age 3600"," allowed_headers X-Custom-Header,X-Foobar"," exposed_headers X-Something-Special,SomethingElse","}","","