title: Want to add custom header to grails application
body: <p>I have Grails application there is button onclicking which it is forwarded to a action which is authenticated by spring security and first goes to login page if a user is not logged in and then come to the expected page.</p>
  
  <p>I want to set header after the button is clicked and want it in login page only if it had been redirected here after clicking on the button normally it shouldn't be there on login page.</p>
  
  <p>I have redirected to another function from GSP and there I am setting header and from there I have redirected to the actuall function.</p>
  
  <p>For the first time when server runs the value comes but after that it dissappears.</p>
  
  <p>Please guide me.</p>
  
  <p>My code:-</p>
  
  <pre><code>gsp code :
  
  &lt;g:form controller="project" action="addFundraiserUrl" id="${project.id}"  params="['fr':currentFundraiser.username]"&gt;
                      &lt;input type="submit" value="Join Us" class="col-md-12 col-sm-12 col-xs-12 inviteteammember text-center btn btn-default btn-md manage-team"/&gt;
                  &lt;/g:form&gt;
  
  controller code :- 
  
  def addFundraiserUrl () {
      response.setHeader 'X-JoinUs', 'true'
      redirect (action:'addFundRaiser', params:params)
  }
  
  @Secured(['IS_AUTHENTICATED_FULLY'])
  def addFundRaiser(){
      def project = projectService.getProjectById(params.id)
      User user = userService.getCurrentUser()
      def fundraiser = project.user.username
      def iscampaignAdmin = userService.isCampaignBeneficiaryOrAdmin(project, user)
      def message = projectService.getFundRaisersForTeam(project, user)
      def title = projectService.getVanityTitleFromId(params.id)
      def name = userService.getVanityNameFromUsername(fundraiser, params.id)
  
      if (iscampaignAdmin) {
          flash.prj_mngprj_message = message
          redirect (action: 'manageproject', params:['projectTitle':title])
      } else {
          flash.prj_mngprj_message = message
          redirect (action: 'show', params:['projectTitle':title,'fr':name])
      }
  }
  </code></pre>