satoryu / yaba

Yet Another Blog on Azure
1 stars 0 forks source link

Some fonts provided by bootstrap-sass could not be served on Azure #4

Closed satoryu closed 6 years ago

satoryu commented 6 years ago

According to the following rule given by Composer Extension's application,

https://github.com/SyntaxC4-MSFT/ComposerExtension/blob/df2eee9426f89f7d193a7b4254cacae5ff30db39/Content/applicationHost.xdt#L23-L25

any files under the directories whose name includes vendor cannot be reached from anywhere.

The fonts is stored under Bootstrap's vendor directory. Laravel-mix copies the files into public directory.

satoryu commented 6 years ago

This doc says that ECMAScript's Regular expression is allowed in this configuration.

The one of IIS Server Variables URL means the path of a request URL:

Rewriting the pattern add rule as follows resolve this situation :)

satoryu commented 6 years ago

Unfortunately, another problem has raised. Fonts extensions(such as woff, woff2 and so on) is not handled by IIS in default.

screen shot 2017-12-13 at 11 09 38

satoryu commented 6 years ago

I found two articles for adding mimetype to be handled by IIS:

satoryu commented 6 years ago

Sent a pull-request to fix Composer's applicationHost:

https://github.com/SyntaxC4-MSFT/ComposerExtension/pull/20

satoryu commented 6 years ago

Already fixed by removing Composer Extension and install custom deployment script and composer into this repository.