mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-26 20:00:43 +00:00
test content security policy header modification
This commit is contained in:
@@ -20,6 +20,7 @@ export default function handler(
|
|||||||
let params: Parameters = req.query;
|
let params: Parameters = req.query;
|
||||||
let userid = req.query.id[0];
|
let userid = req.query.id[0];
|
||||||
res.setHeader("Content-Type", "image/svg+xml; charset=utf-8");
|
res.setHeader("Content-Type", "image/svg+xml; charset=utf-8");
|
||||||
|
res.setHeader("content-security-policy", "default-src 'none'; style-src 'unsafe-inline'");
|
||||||
|
|
||||||
axios.get(`https://api.lanyard.rest/v1/users/${userid}`)
|
axios.get(`https://api.lanyard.rest/v1/users/${userid}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ const renderCard = (body: LanyardTypes.Root, params: Parameters): any => {
|
|||||||
inset: 0;
|
inset: 0;
|
||||||
background-color: #1a1c1f;
|
background-color: #1a1c1f;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: 'Century Gothic';
|
font-family: 'Century Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
Reference in New Issue
Block a user