Skip to content

Commit

Permalink
Tags de proteção meta adicionados
Browse files Browse the repository at this point in the history
  • Loading branch information
GeovaneDev committed Feb 2, 2024
1 parent f4984a4 commit f871c89
Show file tree
Hide file tree
Showing 7 changed files with 154 additions and 7 deletions.
24 changes: 24 additions & 0 deletions app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@ const Home = () => {
name: 'robots',
content: 'index, follow',
},
{
name: 'Strict-Transport-Security',
content: 'max-age=63072000; includeSubdomains; preload',
},
{
name: 'X-Content-Type-Options',
content: 'nosniff',
},
{
name: 'X-Frame-Options',
content: 'DENY',
},
{
name: 'X-XSS-Protection',
content: '1; mode=block',
},
{
name: 'Referrer-Policy',
content: 'same-origin',
},
{
name: 'Set-Cookie',
content: 'HttpOnly; Secure; SameSite=Strict',
}
]}
canonical="https://www.brinvestapi.me/"
/>
Expand Down
7 changes: 5 additions & 2 deletions pages/api/fundamentus/dividend.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ export default async function handler(req, res) {
}

try {
// Converte o ticket para maiúsculas e codifica para URL
const encodedTicket = encodeURIComponent(ticket.toUpperCase());

//Envia o request
const response = await axios.get(`https://statusinvest.com.br/acoes/${ticket}`, {
const response = await axios.get(`https://statusinvest.com.br/acoes/${encodedTicket}`, {
responseType: 'arraybuffer',
headers: {
'User-agent': 'Mozilla/5.0 (Windows NT 10.0; rv:122.0) Gecko/20100101 Firefox/122.0',
Expand Down Expand Up @@ -46,7 +49,7 @@ export default async function handler(req, res) {
});

} catch (error) {
//Trata os error
//Trata os erros
console.error('Erro ao obter dados:', error);
res.status(500).json({ error: 'Erro ao obter dados' });
}
Expand Down
24 changes: 24 additions & 0 deletions pages/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@ const Docs = () => {
name: 'robots',
content: 'index, follow',
},
{
name: 'Strict-Transport-Security',
content: 'max-age=63072000; includeSubdomains; preload',
},
{
name: 'X-Content-Type-Options',
content: 'nosniff',
},
{
name: 'X-Frame-Options',
content: 'DENY',
},
{
name: 'X-XSS-Protection',
content: '1; mode=block',
},
{
name: 'Referrer-Policy',
content: 'same-origin',
},
{
name: 'Set-Cookie',
content: 'HttpOnly; Secure; SameSite=Strict',
}
]}
canonical="https://www.brinvestapi.me/docs"
/>
Expand Down
24 changes: 24 additions & 0 deletions pages/docs/domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@ const DomainInfo = () => {
name: 'robots',
content: 'index, follow',
},
{
name: 'Strict-Transport-Security',
content: 'max-age=63072000; includeSubdomains; preload',
},
{
name: 'X-Content-Type-Options',
content: 'nosniff',
},
{
name: 'X-Frame-Options',
content: 'DENY',
},
{
name: 'X-XSS-Protection',
content: '1; mode=block',
},
{
name: 'Referrer-Policy',
content: 'same-origin',
},
{
name: 'Set-Cookie',
content: 'HttpOnly; Secure; SameSite=Strict',
}
]}
canonical="https://www.brinvestapi.me/docs/domain"
/>
Expand Down
34 changes: 29 additions & 5 deletions pages/docs/endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,38 @@ const Endpoints = () => {
}}
additionalMetaTags={[
{
name: 'viewport',
content: 'width=device-width, initial-scale=1.0',
name: 'viewport',
content: 'width=device-width, initial-scale=1.0',
},
{
name: 'robots',
content: 'index, follow',
name: 'robots',
content: 'index, follow',
},
]}
{
name: 'Strict-Transport-Security',
content: 'max-age=63072000; includeSubdomains; preload',
},
{
name: 'X-Content-Type-Options',
content: 'nosniff',
},
{
name: 'X-Frame-Options',
content: 'DENY',
},
{
name: 'X-XSS-Protection',
content: '1; mode=block',
},
{
name: 'Referrer-Policy',
content: 'same-origin',
},
{
name: 'Set-Cookie',
content: 'HttpOnly; Secure; SameSite=Strict',
}
]}
canonical="https://www.brinvestapi.me/docs/endpoints"
/>
<Navbar />
Expand Down
24 changes: 24 additions & 0 deletions pages/docs/introduction.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@ const Introduction = () => {
name: 'robots',
content: 'index, follow',
},
{
name: 'Strict-Transport-Security',
content: 'max-age=63072000; includeSubdomains; preload',
},
{
name: 'X-Content-Type-Options',
content: 'nosniff',
},
{
name: 'X-Frame-Options',
content: 'DENY',
},
{
name: 'X-XSS-Protection',
content: '1; mode=block',
},
{
name: 'Referrer-Policy',
content: 'same-origin',
},
{
name: 'Set-Cookie',
content: 'HttpOnly; Secure; SameSite=Strict',
}
]}
canonical="https://www.brinvestapi.me/docs/introduction"
/>
Expand Down
24 changes: 24 additions & 0 deletions pages/terms.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,30 @@ const TermsOfService = () => {
name: 'robots',
content: 'index, follow',
},
{
name: 'Strict-Transport-Security',
content: 'max-age=63072000; includeSubdomains; preload',
},
{
name: 'X-Content-Type-Options',
content: 'nosniff',
},
{
name: 'X-Frame-Options',
content: 'DENY',
},
{
name: 'X-XSS-Protection',
content: '1; mode=block',
},
{
name: 'Referrer-Policy',
content: 'same-origin',
},
{
name: 'Set-Cookie',
content: 'HttpOnly; Secure; SameSite=Strict',
}
]}
canonical="https://www.brinvestapi.me/terms"
/>
Expand Down

0 comments on commit f871c89

Please sign in to comment.