hunk.code_window: 		w.Header().Set("Cache-Control", "max-age=31536000")
   	} else {
   		w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
   	}
   	handler.Handler.ServeHTTP(w, r)
   }
hunk.labels: keep keep keep add keep keep
hunk.after_edit: 	w.Header().Add("X-Frame-Options", "DENY")
   	w.Header().Add("X-XSS-Protection", "1; mode=block")
   	w.Header().Add("X-Content-Type-Options", "nosniff")
  
hunk.file_path: api/http/handler/file/handler.go
hunk.type: add
file: angular.module('portainer.app')
  .controller('TagSelectorController', function () {
  
    this.$onChanges = function(changes) {
      if(angular.isDefined(changes.tags.currentValue)) {
        this.tags = _.difference(changes.tags.currentValue, this.model);
      }
    };
  
    this.state = {
      selectedValue: '',
      noResult: false
    };
  
    this.selectTag = function($item) {
      this.state.selectedValue = '';
      this.model.push($item);
      this.tags = _.remove(this.tags, function(item) {
        return item !== $item;
      });
    };
  
    this.removeTag = function(tag) {
      var idx = this.model.indexOf(tag);
      if (idx > -1) {
        this.model.splice(idx, 1);
        this.tags.push(tag);
      }
    };
  });
  