删除应用程序标题

时间:2018-05-16 13:56:59

标签: nginx web-applications http-headers

我使用headers_more_module编译了nginx并将其配置为删除

Sub split_export_data() Dim lr As Long Dim ws, edws, esws As Worksheet Dim vcol, i, j As Long Dim icol As Long Dim myarr As Variant Dim title As String Dim titlerow As Integer Dim xPath As String Dim lastrow, sumrow As Integer Dim sumrng As Range Dim sum10, sum11, sum12, sum13, sum14, sum15, sum16, sum17 As Long vcol = 3 ' vcol is the column by which the table data is parsed and split Set ws = Sheets("master") lr = ws.Cells(ws.Rows.Count, vcol).End(xlUp).Row ' lr is last row' title = "A1:al1" ' title is header to be copied to new worksheets titlerow = ws.Range(title).Cells(1).Row icol = ws.Columns.Count ' icol is the last column in the worksheet ws.Cells(1, icol) = "Unique" ' writes "unique" for temporary header of the last column(icol) xPath = Application.ActiveWorkbook.Path Application.ScreenUpdating = False Application.DisplayAlerts = False ' finds all the unique sales rep names in vcol and temporarily writes them to column icol For i = 2 To lr On Error Resume Next If ws.Cells(i, vcol) <> "" And Application.WorksheetFunction.Match(ws.Cells(i, vcol), ws.Columns(icol), 0) = 0 Then ws.Cells(ws.Rows.Count, icol).End(xlUp).Offset(1) = ws.Cells(i, vcol) End If Next 'stores transposed unique sales rep names in the array object Myarr and clears the icol column values myarr = Application.WorksheetFunction.Transpose(ws.Columns(icol).SpecialCells(xlCellTypeConstants)) ws.Columns(icol).Clear ' filters to show only rows with sales-rep(i) name original worksheet. Copies into new worksheet named for rep For i = 2 To UBound(myarr) ws.Range(title).AutoFilter field:=vcol, Criteria1:=myarr(i) & "" If Not Evaluate("=ISREF('" & myarr(i) & "'!A1)") Then Sheets.Add(after:=Worksheets(Worksheets.Count)).Name = myarr(i) & "_Detailed" Else Sheets(myarr(i) & "_Detailed").Move after:=Worksheets(Worksheets.Count) End If ws.Range("A" & titlerow & ":A" & lr).EntireRow.Copy Sheets(myarr(i) & "_Detailed").Range("A1") Sheets(myarr(i) & "_Detailed").Columns.AutoFit ' Add summation to each column after the last row of data Set edws = Sheets(myarr(i) & "_Detailed") lastrow = edws.Cells(edws.Rows.Count, vcol).End(xlUp).Row sumrow = edws.Cells(edws.Rows.Count, vcol).End(xlUp).Offset(1).Row Set sumrng = edws.Range("J2:P" & lastrow) For j = 1 To 17 With sumrng.Columns(j).Rows(sumrow) .FormulaR1C1 = "=SUM(R[-" & lastrow & "]C:R[-1]C)" .Font.Bold = True End With Next sum10 = edws.Cells(sumrow, 10).Offset(1).Value sum11 = edws.Cells(sumrow, 11).Offset(1).Value sum12 = edws.Cells(sumrow, 12).Offset(1).Value sum13 = edws.Cells(sumrow, 13).Offset(1).Value sum14 = edws.Cells(sumrow, 14).Offset(1).Value sum15 = edws.Cells(sumrow, 15).Offset(1).Value sum16 = edws.Cells(sumrow, 16).Offset(1).Value sum17 = edws.Cells(sumrow, 17).Offset(1).Value ' Move the new sales-rep sheet to a new Workbook Sheets(myarr(i) & "_Detailed").Select Sheets(myarr(i) & "_Detailed").Move ' Add and set up summary worksheet in sales rep workbook ActiveWorkbook.Sheets.Add(after:=Worksheets(Worksheets.Count)).Name = myarr(i) & "_Summary" Set esws = Sheets(myarr(i) & "_Summary") With esws .Cells(1, 1) = "Employee" .Cells(1, 2) = "GP W/Split" .Cells(1, 3) = "GP with Adjustments W/Split" .Cells(1, 4) = "GP with 6 Month Chargebacks, Adj. & Split" .Cells(1, 5) = "Sum of Individual Commission" .Cells(1, 7) = "Sum of Spiff & Adjustments" .Cells(1, 8) = "Sum of Manager Bonus (if applicable)" .Cells(1, 9) = "Sum of Net Payout" .Cells(2, 1) = myarr(i) .Cells(2, 2) = sum10 .Cells(2, 3) = sum11 .Cells(2, 4) = sum12 .Cells(2, 5) = sum13 .Cells(2, 7) = sum15 .Cells(2, 8) = sum16 .Cells(2, 9) = sum17 End With With esws.Range("A1:I2") .Borders.LineStyle = xlContinuous .Borders.Weight = xlThin .WrapText = True .ColumnWidth = 12 End With esws.Range("B2:I2").NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)" Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & myarr(i) & "" & ".xlsx" ActiveWorkbook.Close ' continue loop with all other sales-reps Next ws.AutoFilterMode = False Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub

来自回应。

现在,当给出curl -Ik example.com时,不会显示服务器名称。但是,当我ping我站点的https URL时,我在服务器响应中获取服务器名称。如何从https响应中完全删除服务器名称?

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:0)

您指的是http响应标头Server吗?

我不清楚你的意思是:

  

将其配置为从响应中删除应用程序名称。

您的意思是服务器标头,例如server: nginx?也许请看:https://serverfault.com/questions/214242/can-i-hide-all-server-os-info?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

NGINX中的http和https配置可能由两个独立的server块控制,这意味着它们可以具有不同的配置。您能否确认已将所需配置应用于两个服务器块。