Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83725101AA for ; Fri, 23 Aug 2013 02:29:11 +0000 (UTC) Received: (qmail 45365 invoked by uid 500); 23 Aug 2013 02:29:09 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 45328 invoked by uid 500); 23 Aug 2013 02:29:09 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 45320 invoked by uid 99); 23 Aug 2013 02:29:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Aug 2013 02:29:09 +0000 X-ASF-Spam-Status: No, hits=-0.2 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_RHS_DOB,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of wbin00@gmail.com designates 209.85.219.46 as permitted sender) Received: from [209.85.219.46] (HELO mail-oa0-f46.google.com) (209.85.219.46) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Aug 2013 02:29:05 +0000 Received: by mail-oa0-f46.google.com with SMTP id j10so139709oah.19 for ; Thu, 22 Aug 2013 19:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=z9zyXjRveV89eOkg+U0iTdHwg9fh1JZtxdDa3Cjb1Ro=; b=cKSbFzx8COiDAwWnlu+W7OHNfs8TwPahaL01AFLm6JP9aqFaf5mKnSMpQjgME/56RE BzxDE+SGntc3EdqkAIWF0RjyDFaiUZsbuNclT0T1QVRqka+y9VEhLJ51EL4uOI6FS1wb qALL00OpFpKvFy9o0FM2omVM/qbldBThimoVLiuBE2jorE9DSFu1MN8u1NBU5tMtWOZY fxKfzZAfmlyfEikabTDZmejXzcXmuXlVQba847vQTSKaYU7yxiSaudehol/hsnog7FZ5 9Ch1S4aFoTTGxmePdh2/pD3InxuosFD2Y1XPNQ6VAg9e/eZ2iiON9BPFi1S84HsleKfe zzdg== MIME-Version: 1.0 X-Received: by 10.182.101.198 with SMTP id fi6mr12282875obb.79.1377224924734; Thu, 22 Aug 2013 19:28:44 -0700 (PDT) Received: by 10.76.137.38 with HTTP; Thu, 22 Aug 2013 19:28:44 -0700 (PDT) In-Reply-To: <3AB2EC8A0B22CB42B8DD61B5198DA2AF922B74@NASANEXD02C.na.qualcomm.com> References: <3AB2EC8A0B22CB42B8DD61B5198DA2AF922B74@NASANEXD02C.na.qualcomm.com> Date: Fri, 23 Aug 2013 10:28:44 +0800 Message-ID: Subject: Re: HTTP access control (CORS, Cross Origin Resource Sharing ) problem with couchdb server From: Bin Wang To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I'm new to couchdb. But I think you can find the way in document: http://docs.couchdb.org/en/latest/config_reference.html?highlight=access 11.16. cors Configuration Options OptionDescription originsList of origins, separated by a comma (protocol, host, optional port) methodsaccepted HTTP methods credentialstrue sends additional header Access-Control-Allow-Credentials=true Note that credentials=true and origins=* are mutually exclusive. 2013/8/23 Rao, Zhiqing : > Hi guys, > > When I use ajax to query couchdb view from http://a.com to http://b.com:5984/db/_design/viewxx, > All the available update to date browsers would report error: "required Cross Origin Resource Sharing (CORS)". > > I know how to fix the CORS with IIS based website, by adding "Access-Control-Allow-Origin: *" to website response headers. > But how can I add the response header for couchdb server? > > Thanks, > Zhiqing