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
{ | |
"$schema": "http://json.schemastore.org/proxies", | |
"proxies": { | |
"PingProxy": { | |
"matchCondition": { | |
"route": "/api/v1/{*restOfPath}" | |
}, | |
"backendUri": "https://localhost/api/{restOfPath}", | |
"responseOverrides": { | |
"response.headers.spl-version": "2018-03-08" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<staticContent> | |
<mimeMap fileExtension="woff" mimeType="application/font-woff" /> | |
<mimeMap fileExtension="woff2" mimeType="application/font-woff" /> | |
</staticContent> | |
<rewrite> | |
<rules> | |
<rule name="Handle History Mode and custom 404/500" stopProcessing="true"> |
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
const echoPostRequest = { | |
url: 'https://<my url>.auth0.com/oauth/token', | |
method: 'POST', | |
header: 'Content-Type:application/json', | |
body: { | |
mode: 'application/json', | |
raw: JSON.stringify( | |
{ | |
client_id:'<your client ID>', | |
client_secret:'<your client secret>', |
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
{ | |
"IsEncrypted": false, | |
"Values": { | |
"AzureWebJobsStorage": "<connection string to blob storage>", | |
"AzureWebJobsDashboard": "", | |
"WolfImageContainer": "wolfpictures-originals", | |
"WolfImageQueue": "queue-wolfimages", | |
"Auth0Audience": "<auth0 key>", | |
"Auth0Issuer": "https://wolftracker.au.auth0.com/", | |
"CognitiveServicesVisionUrl": "https://southcentralus.api.cognitive.microsoft.com/vision/v1.0/", |
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
using System; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Host; | |
namespace WolfTrackerAPI | |
{ | |
public static class PingTimer | |
{ |
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
# Note that variables. You can just replace them with text in quotes. For the WolfTrackerBlobKey I would suggest pulling | |
# that data from Azure Key Vault | |
$Context = New-AzureStorageContext -StorageAccountName $(BlobServiceName) -StorageAccountKey $(WolfTrackerBlobKey) | |
$Blobs = Get-AzureStorageBlob -Context $Context -Container $(WolfTrackerBlobContainer) | |
foreach ($Blob in $Blobs) | |
{ | |
$Extn = [IO.Path]::GetExtension($Blob.Name) | |
$ContentType = "" |
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
# You will either need variables created for WolfTrackerBlobKey or just put the text there in quotes. Ditto with BlobServiceName and | |
# WolfTrackerBlobContainer. I would suggest you store WolfTrackerBlobKey in Azure Key Vault and pull it from there | |
$Context = New-AzureStorageContext -StorageAccountName $(BlobServiceName) -StorageAccountKey $(WolfTrackerBlobKey) | |
$blobs = Get-AzureStorageBlob -Context $Context -Container $(WolfTrackerBlobContainer) | |
foreach ($blob in $blobs) | |
{ | |
Write-Host ("Removing Blob: {0}" -f $blob.Name) | |
Remove-AzureStorageBlob -ICloudBlob $blob.ICloudBlob -Context $Context |
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
{ | |
"wolves": [ | |
{ "images": [ | |
"https://wolftracker9eee.blob.core.windows.net/wolfpictures-mock/big-wolf1.png", | |
"https://wolftracker9eee.blob.core.windows.net/wolfpictures-mock/wolf1.png" | |
]}, | |
{ "images": [ | |
"https://wolftracker9eee.blob.core.windows.net/wolfpictures-mock/big-wolf2.png", | |
"https://wolftracker9eee.blob.core.windows.net/wolfpictures-mock/wolf2.png" | |
]}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Sign In with Wolf Tracker</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
</head> | |
<body> |
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
# The File Copy step (which uses AzCopy) has /SetContentType but it ignores a bunch of types and messes | |
# up the content type of others. This script fixes the common ones. | |
$StorageAccountName = "<ENTER YOUR STORAGE ACCOUNT NAME HERE>" # i.e. WolfTrackerStorage | |
# If you're using VSTS I would strongly suggest using Key Vault to store and retrieve the key. Keep secrets out of your code! | |
$StorageAccountKey = "<ENTER YOUR STORAGE KEY FROM THE PORTAL>" | |
$ContainerName = "<NAME OF THE BLOB CONTAINER>" # i.e. wolfpics | |
$Context = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey | |
$Blobs = Get-AzureStorageBlob -Context $Context -Container $ContainerName |