forked from nightscout/cgm-remote-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forcing SSL for Azure Node Debugging Support for Azure Correct Git Attributes Node web.config for Azure, and removed it from gitignore
- Loading branch information
1 parent
30644ea
commit 2acba2a
Showing
3 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,4 @@ static/bower_components/ | |
.DS_Store | ||
|
||
.vagrant | ||
/iisnode | ||
/web.config | ||
/iisnode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<system.webServer> | ||
<handlers> | ||
<add name="iisnode" path="server.js" verb="*" modules="iisnode"/> | ||
</handlers> | ||
<rewrite> | ||
<rules> | ||
<rule name="Force redirect to https"> | ||
<match url="(.*)"/> | ||
<conditions> | ||
<add input="{HTTP_HOST}" pattern=".+\.azurewebsites\.net$" /> | ||
<add input="{HTTPS}" pattern="Off"/> | ||
<add input="{REQUEST_METHOD}" pattern="^get$|^head$" /> | ||
</conditions> | ||
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}"/> | ||
</rule> | ||
<!-- First we consider whether the incoming URL matches a physical file in the /public folder --> | ||
<rule name="StaticContent"> | ||
<action type="Rewrite" url="public{REQUEST_URI}"/> | ||
</rule> | ||
<!-- All other URLs are mapped to the node.js site entry point --> | ||
<rule name="DynamicContent"> | ||
<conditions> | ||
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/> | ||
</conditions> | ||
<action type="Rewrite" url="server.js"/> | ||
</rule> | ||
</rules> | ||
</rewrite> | ||
|
||
<!-- 'bin' directory has no special meaning in node.js and apps can be placed in it --> | ||
<security> | ||
<requestFiltering> | ||
<hiddenSegments> | ||
<remove segment="bin"/> | ||
</hiddenSegments> | ||
</requestFiltering> | ||
</security> | ||
|
||
<!-- Make sure error responses are left untouched --> | ||
<httpErrors existingResponse="PassThrough" /> | ||
|
||
<!-- | ||
You can control how Node is hosted within IIS using the following options: | ||
* watchedFiles: semi-colon separated list of files that will be watched for changes to restart the server | ||
* node_env: will be propagated to node as NODE_ENV environment variable | ||
* debuggingEnabled - controls whether the built-in debugger is enabled | ||
See https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config for a full list of options | ||
--> | ||
<!--<iisnode watchedFiles="web.config;*.js"/>--> | ||
</system.webServer> | ||
</configuration> |