iis10托管unity webgl app
engalar
2021.09.27 14:49发布于技术 - 部署与运维
790

开启iis10

  • image.png
  • image.png

安装iis组件

配置web.config

参考引用

<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> <staticContent> <remove fileExtension=".js.gz" /> <remove fileExtension=".css.gz" /> <remove fileExtension=".png.gz" /> <remove fileExtension=".jpg.gz" /> <remove fileExtension=".gif.gz" /> <remove fileExtension=".svg.gz" /> <remove fileExtension=".html.gz" /> <remove fileExtension=".json.gz" /> <remove fileExtension=".wasm.gz" /> <remove fileExtension=".data.gz" /> <mimeMap fileExtension=".js.gz" mimeType="application/javascript" /> <mimeMap fileExtension=".css.gz" mimeType="text/css" /> <mimeMap fileExtension=".png.gz" mimeType="image/png" /> <mimeMap fileExtension=".jpg.gz" mimeType="image/jpeg" /> <mimeMap fileExtension=".gif.gz" mimeType="image/gif" /> <mimeMap fileExtension=".svg.gz" mimeType="image/svg+xml" /> <mimeMap fileExtension=".html.gz" mimeType="text/html" /> <mimeMap fileExtension=".json.gz" mimeType="application/json" /> <mimeMap fileExtension=".wasm.gz" mimeType="application/wasm" /> <mimeMap fileExtension=".data.gz" mimeType="application/octet-stream" /> </staticContent> <rewrite> <outboundRules rewriteBeforeCache="true"> <rule name="Custom gzip file header"> <match serverVariable="RESPONSE_CONTENT_ENCODING" pattern=".*" /> <conditions> <add input="{REQUEST_URI}" pattern="\.gz$" /> </conditions> <action type="Rewrite" value="gzip"/> </rule> </outboundRules> <rules> <rule name="Rewrite gzip file"> <match url="(.*)"/> <conditions> <add input="{HTTP_ACCEPT_ENCODING}" pattern="gzip" /> <add input="{REQUEST_FILENAME}.gz" matchType="IsFile" /> </conditions> <action type="Rewrite" url="{R:1}.gz" /> </rule> </rules> </rewrite> </system.webServer> </configuration>

部署

image.png

配置mendix组件

下载地址

源代码 组件

image.png

  • http://yourhost/Build/unity3d
首赞
收藏
手机查看
举报
0个评论
倒序看帖
仅看楼主

暂无数据