Skip to content

Commit

Permalink
maybe fix the api that has been broken for a while...
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicMaas committed Sep 4, 2023
1 parent bef0d1c commit 2e593dd
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 31 deletions.
48 changes: 28 additions & 20 deletions src/Website/Pages/Projects/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@
<p>A collection of personal projects that I have worked on over the years. Feel free to explore around and click on the card headings for more information.</p>

<section>
<div class="card card-background">
<small>Active: 2015 - 2020</small>
<p class="card-title"><a href="/projects/soundbyte">SoundByte</a></p>

<p>SoundByte was a music client originally built for Windows Phone and later ported to Windows 10 &amp; Xbox One which combined the ability to play local music on your device, alongside SoundCloud and YouTube content (and at one point, Fanburst content).</p>
<p><a href="https://soundbytemedia.com">Website</a> • <a href="https://github.com/DominicMaas/SoundByteOSS">GitHub</a></p>

<br />
<img class="pure-img image" src="/images/soundbyte/sb_final.jpg" />
</div>

<div class="card card-background">
<small>2017 - Current</small>
<p class="card-title"><a href="https://github.com/CitiesSkylinesMultiplayer/CSM/">Cities Skylines: Multiplayer</a></p>
Expand All @@ -35,16 +24,31 @@
</div>

<div class="card card-background">
<small>Archived</small>
<p class="card-title"><a href="https://apps.microsoft.com/store/detail/9NBLGGH4RTC2?hl=en-us&gl=US">XKCD Explorer</a></p>
<small>2023 - Current</small>
<p class="card-title"><a href="/projects/danny">Project Danny</a></p>
<p>
XKCD Explorer is a simple, beautiful yet effective app that lets you view xkcd web comics, share xkcd web comics with your friends, save your
favorite web comics across devices, receive notifications when a new web comic is posted and view the meaning behind popular xkcd web comics.
Project Danny is an assistive application allowing non-verbal communication via touch input and customisable pictures.
</p>
</div>

<div class="card card-background">
<small>Active: 2015 - 2020</small>
<p class="card-title"><a href="/projects/soundbyte">SoundByte</a></p>

<p>SoundByte was a music client originally built for Windows Phone and later ported to Windows 10 &amp; Xbox One which combined the ability to play local music on your device, alongside SoundCloud and YouTube content (and at one point, Fanburst content).</p>

<br />
<img class="pure-img image" src="/images/soundbyte/sb_final.jpg" />
</div>

<img class="pure-img image" src="/images/projects/xkcd.png" />
<div class="card card-background">
<small>Archived</small>
<p class="card-title"><a href="https://github.com/DominicMaas/SpaceChunks">Space Chunks</a></p>
<p>
An experimental voxel game engine + game that I developed
to understand how voxel based worlds are generated and basic
c++ / game programming.
</p>
</div>

<div class="card card-background">
Expand All @@ -62,11 +66,15 @@

<div class="card card-background">
<small>Archived</small>
<p class="card-title"><a href="https://github.com/DominicMaas/SpaceChunks">Space Chunks</a></p>
<p class="card-title"><a href="https://apps.microsoft.com/store/detail/9NBLGGH4RTC2?hl=en-us&gl=US">XKCD Explorer</a></p>
<p>
An experimental voxel game engine + game that I developed
to understand how voxel based worlds are generated and basic
c++ / game programming.
XKCD Explorer is a simple, beautiful yet effective app that lets you view xkcd web comics, share xkcd web comics with your friends, save your
favorite web comics across devices, receive notifications when a new web comic is posted and view the meaning behind popular xkcd web comics.
</p>

<br />

<img class="pure-img image" src="/images/projects/xkcd.png" />
</div>

</section>
22 changes: 11 additions & 11 deletions src/Website/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@

var app = builder.Build();

app.Use(async (context, next) =>
{
// Security Headers
context.Response.Headers.Add("Content-Security-Policy", "default-src 'self'; script-src 'self' 'unsafe-inline' ajax.cloudflare.com static.cloudflareinsights.com gist.github.com; style-src 'self' 'unsafe-inline' github.githubassets.com; frame-src 'self' www.youtube-nocookie.com; img-src 'self' i.ytimg.com;");
context.Response.Headers.Add("X-Frame-Options", "DENY");
context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
context.Response.Headers.Add("Referrer-Policy", "strict-origin-when-cross-origin");

await next();
});

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
Expand All @@ -82,17 +93,6 @@

app.MapControllers();

app.Use(async (context, next) =>
{
// Security Headers
context.Response.Headers.Add("Content-Security-Policy", "default-src 'self'; script-src 'self' 'unsafe-inline' ajax.cloudflare.com static.cloudflareinsights.com gist.github.com; style-src 'self' 'unsafe-inline' github.githubassets.com; frame-src 'self' www.youtube-nocookie.com; img-src 'self' i.ytimg.com;");
context.Response.Headers.Add("X-Frame-Options", "DENY");
context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
context.Response.Headers.Add("Referrer-Policy", "strict-origin-when-cross-origin");

await next();
});


// Run our migrations on start up
using (var serviceScope = app.Services.GetService<IServiceScopeFactory>()!.CreateScope())
Expand Down

0 comments on commit 2e593dd

Please sign in to comment.