Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D1F53200AE4 for ; Wed, 25 May 2016 18:12:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D0FAB160A2E; Wed, 25 May 2016 16:12:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 26732160A34 for ; Wed, 25 May 2016 18:12:19 +0200 (CEST) Received: (qmail 20914 invoked by uid 500); 25 May 2016 16:12:13 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 20847 invoked by uid 99); 25 May 2016 16:12:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2016 16:12:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D963E2C1F60 for ; Wed, 25 May 2016 16:12:12 +0000 (UTC) Date: Wed, 25 May 2016 16:12:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4690) Header in RestApi CORS support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 25 May 2016 16:12:20 -0000 [ https://issues.apache.org/jira/browse/DRILL-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15300302#comment-15300302 ] ASF GitHub Bot commented on DRILL-4690: --------------------------------------- Github user laurentgo commented on a diff in the pull request: https://github.com/apache/drill/pull/507#discussion_r64602614 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java --- @@ -159,6 +163,14 @@ public void start() throws Exception { servletContextHandler.setSessionHandler(createSessionHandler(servletContextHandler.getSecurityHandler())); } + if (config.getBoolean(ExecConstants.HTTP_ENABLE_CORS)) { + FilterHolder cors = servletContextHandler.addFilter(CrossOriginFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST)); + cors.setInitParameter(CrossOriginFilter.ALLOWED_ORIGINS_PARAM, "*"); + cors.setInitParameter(CrossOriginFilter.ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, "*"); --- End diff -- if it doesn't end with _PARAM, it probably means it's not a param but a constant used for something else (likely to set a HTTP header in the response). It's probably harmless, but better be removed. > Header in RestApi CORS support > ------------------------------- > > Key: DRILL-4690 > URL: https://issues.apache.org/jira/browse/DRILL-4690 > Project: Apache Drill > Issue Type: Improvement > Reporter: Wojciech Nowak > Priority: Minor > > Damien Cantreras raised question on mailing list, related to Drill RestAPI support for Header "Access-Control-Allow-Origin: *" > to allow it being used from a HTML5 application. > Place where Header should be added https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java -- This message was sent by Atlassian JIRA (v6.3.4#6332)