Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions frontend/src/services/jobsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ function getApiBaseUrl(): string {
return configuredBaseUrl;
}

if (typeof window !== "undefined" && window.location.hostname === "painel-vagas-lake.vercel.app") {
return "https://jobsglobalscraper.ddns.net";
}

return "";
}

Expand Down
8 changes: 8 additions & 0 deletions frontend/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"rewrites": [
{
"source": "/api/(.*)",
"destination": "http://jobsglobalscraper.ddns.net/api/$1"

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destination is using plain HTTP to the backend (http://jobsglobalscraper.ddns.net/...). This sends API traffic from Vercel to the origin unencrypted and may also fail if the platform/origin enforces HTTPS. Prefer using the HTTPS endpoint (the repo already documents https://jobsglobalscraper.ddns.net) and consider making the origin configurable per environment (Preview vs Production) to avoid preview deployments proxying writes/scraper runs to the production backend.

Suggested change
"destination": "http://jobsglobalscraper.ddns.net/api/$1"
"destination": "https://jobsglobalscraper.ddns.net/api/$1"

Copilot uses AI. Check for mistakes.
}
]
}
Loading