Skip to content

Commit

Permalink
Solved the Issue for exposed Auth Details
Browse files Browse the repository at this point in the history
  • Loading branch information
ROKUMATE committed Jun 28, 2024
1 parent e4cb61c commit f809314
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
.env

# Editor directories and files
.vscode/*
Expand Down
3 changes: 2 additions & 1 deletion src/components/Quotes/QuotesSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "./QuoteSection.css";

const QuoteSection = () => {
const [quote, setQuote] = useState("");
const authInfo = process.env.QUOTES_API_KEY;

useEffect(() => {
fetchDailyQuote();
Expand All @@ -13,7 +14,7 @@ const QuoteSection = () => {
try {
const response = await fetch("https://api.yourquoteapi.com/quotes?author=Chanakya", {
headers: {
"Authorization": `4fe303f4bamshb97ef5b1dd575e0p1ccc51jsnd9644d3c587b`
"Authorization": authInfo,
}
});
const data = await response.json();
Expand Down

0 comments on commit f809314

Please sign in to comment.