Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from PocketRelay/dev
Dashboard Updated
- Loading branch information
Showing
60 changed files
with
125 additions
and
63 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,40 @@ | ||
use axum::{ | ||
http::{header, HeaderValue, Method, Request, StatusCode}, | ||
middleware::Next, | ||
response::Response, | ||
}; | ||
|
||
/// Middleware layer function for appending CORS headers to requests | ||
/// and responding to options requests | ||
/// | ||
/// `req` The request to handle | ||
/// `next` The next layer to use | ||
pub async fn cors_layer<T>(req: Request<T>, next: Next<T>) -> Response { | ||
// Create a new response for OPTIONS requests | ||
let mut res: Response = if req.method() == Method::OPTIONS { | ||
// Default response for OPTIONS requests | ||
let mut res = Response::default(); | ||
*res.status_mut() = StatusCode::NO_CONTENT; | ||
let headers = res.headers_mut(); | ||
headers.insert( | ||
header::ACCESS_CONTROL_ALLOW_METHODS, | ||
HeaderValue::from_static("*"), | ||
); | ||
headers.insert( | ||
header::ACCESS_CONTROL_ALLOW_HEADERS, | ||
HeaderValue::from_static("*"), | ||
); | ||
res | ||
} else { | ||
next.run(req).await | ||
}; | ||
|
||
let headers = res.headers_mut(); | ||
|
||
// Append access control allow origin header for all origins | ||
headers.insert( | ||
header::ACCESS_CONTROL_ALLOW_ORIGIN, | ||
HeaderValue::from_static("*"), | ||
); | ||
res | ||
} |
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
This file was deleted.
Oops, something went wrong.
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 @@ | ||
import{default as t}from"../entry/error.svelte.986a92b4.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...lic/_app/immutable/chunks/10.7dd8ec22.mjs → ...lic/_app/immutable/chunks/10.88e2bf54.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-classes-page.svelte.e155f407.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-classes-page.svelte.0f8e595b.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...lic/_app/immutable/chunks/11.f1d63133.mjs → ...lic/_app/immutable/chunks/11.b494ff93.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-games-page.svelte.bd2d4d42.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-games-page.svelte.60d65e44.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...lic/_app/immutable/chunks/12.9ebcfd26.mjs → ...lic/_app/immutable/chunks/12.544f8e0d.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-inventory-page.svelte.f17cd6cc.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-inventory-page.svelte.62711429.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...lic/_app/immutable/chunks/13.8a1a470f.mjs → ...lic/_app/immutable/chunks/13.556e7395.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-leaderboard-page.svelte.58a65575.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-leaderboard-page.svelte.ba53d1fd.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...lic/_app/immutable/chunks/14.d740da83.mjs → ...lic/_app/immutable/chunks/14.93e30815.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-settings-page.svelte.26ad6963.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-settings-page.svelte.19e9697b.mjs";export{t as component}; |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
import{default as t}from"../entry/create-page.svelte.e1310e56.mjs";export{t as component}; |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
import{default as t}from"../entry/login-page.svelte.7bd47653.mjs";export{t as component}; |
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 @@ | ||
import{default as t}from"../entry/(dashboard)-layout.svelte.ed54f6db.mjs";export{t as component}; |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...blic/_app/immutable/chunks/3.b813f301.mjs → ...blic/_app/immutable/chunks/3.0fcda31b.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-(admin)-layout.svelte.82b89d02.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-(admin)-layout.svelte.a139b16a.mjs";export{t as component}; |
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 @@ | ||
import{default as t}from"../entry/(dashboard)-page.svelte.91191777.mjs";export{t as component}; |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...blic/_app/immutable/chunks/5.75303415.mjs → ...blic/_app/immutable/chunks/5.fcf485d1.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-(admin)-logs-page.svelte.de892694.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-(admin)-logs-page.svelte.1bbd8ca2.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...blic/_app/immutable/chunks/6.13636ff3.mjs → ...blic/_app/immutable/chunks/6.6c2f6b40.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-(admin)-players-page.svelte.d7d1fa04.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-(admin)-players-page.svelte.ca62c10e.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...blic/_app/immutable/chunks/7.64836064.mjs → ...blic/_app/immutable/chunks/7.3293388e.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-(admin)-players-_id_int_-page.svelte.dc88e473.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-(admin)-players-_id_int_-page.svelte.7767f9b9.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...blic/_app/immutable/chunks/8.ebcbee9e.mjs → ...blic/_app/immutable/chunks/8.ac57b4e9.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-(admin)-players-_id_int_-classes-page.svelte.94029adc.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-(admin)-players-_id_int_-classes-page.svelte.82f53d2c.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...blic/_app/immutable/chunks/9.768fcf8e.mjs → ...blic/_app/immutable/chunks/9.2ea5c01f.mjs
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 |
---|---|---|
@@ -1 +1 @@ | ||
import{default as t}from"../entry/(dashboard)-(admin)-players-_id_int_-inventory-page.svelte.e2b51a4d.mjs";export{t as component}; | ||
import{default as t}from"../entry/(dashboard)-(admin)-players-_id_int_-inventory-page.svelte.92687e93.mjs";export{t as component}; |
2 changes: 1 addition & 1 deletion
2
...app/immutable/chunks/Classes.33fa852e.mjs → ...app/immutable/chunks/Classes.a2c95ef1.mjs
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
2 changes: 1 addition & 1 deletion
2
...p/immutable/chunks/Inventory.c8d1cf7a.mjs → ...p/immutable/chunks/Inventory.050ee8ca.mjs
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.