diff --git a/app/page.js b/app/page.js index 00fa678..716f02b 100644 --- a/app/page.js +++ b/app/page.js @@ -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/" /> diff --git a/pages/api/fundamentus/dividend.js b/pages/api/fundamentus/dividend.js index e6e7cd4..2fddac3 100644 --- a/pages/api/fundamentus/dividend.js +++ b/pages/api/fundamentus/dividend.js @@ -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', @@ -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' }); } diff --git a/pages/docs.js b/pages/docs.js index 251766b..7a2e8aa 100644 --- a/pages/docs.js +++ b/pages/docs.js @@ -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" /> diff --git a/pages/docs/domain.js b/pages/docs/domain.js index 9291e7f..dbb0178 100644 --- a/pages/docs/domain.js +++ b/pages/docs/domain.js @@ -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" /> diff --git a/pages/docs/endpoints.js b/pages/docs/endpoints.js index dd15975..ec731fd 100644 --- a/pages/docs/endpoints.js +++ b/pages/docs/endpoints.js @@ -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" /> diff --git a/pages/docs/introduction.js b/pages/docs/introduction.js index a6b1f5a..91f31d4 100644 --- a/pages/docs/introduction.js +++ b/pages/docs/introduction.js @@ -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" /> diff --git a/pages/terms.js b/pages/terms.js index 240f087..e349732 100644 --- a/pages/terms.js +++ b/pages/terms.js @@ -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" />