couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnewson <...@git.apache.org>
Subject [GitHub] couchdb pull request: Add Experimental Content-Security-Policy-Sup...
Date Fri, 06 Jun 2014 08:39:08 GMT
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb/pull/233#discussion_r13480805
  
    --- Diff: src/couchdb/couch_httpd_misc_handlers.erl ---
    @@ -79,6 +80,15 @@ handle_utils_dir_req(#httpd{method='GET'}=Req, DocumentRoot) ->
     handle_utils_dir_req(Req, _) ->
         send_method_not_allowed(Req, "GET,HEAD").
     
    +maybe_add_csp_headers(Headers, "false") ->
    +    Headers;
    +maybe_add_csp_headers(Headers, "true") ->
    --- End diff --
    
    explicit clauses for just "false" and "true" will lead to ugly crashes if a user sets
config to a different value. Instead, and like many other places, match "true" in the first
case and _ in the second. That is, only exactly "true" enables this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message