首先,我需要说,谷歌搜索后,我找不到一种方法来获得我需要的结果。 这是问题所在:
我尝试了很多规则,但没有一个能完成这项工作。例如:
import pytesseract
from pytesseract import image_to_string
import PIL.Image
from PIL import Image
from wand.image import Image as Img
答案 0 :(得分:2)
这应该将foo.com重定向到HTTPS:
Win10 OS Build Release 16299
对于bar.com:
[HttpPost]
[Route("api/excel/")]
public IActionResult ExportToExcel([FromBody] List<MonthlyReport> monthlyReports, string type)
{
using (var stream = new MemoryStream())
{
var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Fakturering");
//Removed for simplicity, I Add data to excelsheet
worksheet.Columns().AdjustToContents();
workbook.SaveAs(stream);
stream.Seek(0, SeekOrigin.Begin);
return new FileContentResult(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Octet);
}
}
查看第一条规则中的<rule name="Add WWW prefix to foo.com and use HTTPS" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="^foo\.com" />
</conditions>
<action type="Redirect" url="https://www.foo.com/{R:1}" redirectType="Permanent" />
</rule>
属性。当foo.com匹配时,它应该停止处理下一个规则。这将不允许触发“Force NonHTTPS”规则。