Skip to content

Develop - #69

Merged
Benevanio merged 2 commits into
masterfrom
develop
Apr 7, 2026
Merged

Benevanio merged 2 commits into
masterfrom
develop

Conversation

@Benevanio

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 15:12
@vercel

vercel Bot commented Apr 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
painel-vagas Ready Ready Preview, Comment Apr 7, 2026 3:12pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the frontend’s production API routing strategy by moving Vercel-specific API targeting out of runtime hostname checks and into a Vercel rewrite rule, so the frontend can call /api/* on the same origin.

Changes:

  • Added a vercel.json rewrite to proxy /api/* requests to the external backend.
  • Removed the window.location.hostname special-case in jobsService so API URLs are derived solely from VITE_API_BASE_URL or fall back to relative /api/* paths.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frontend/vercel.json Adds Vercel rewrite to proxy /api/* to the backend origin.
frontend/src/services/jobsService.ts Removes Vercel-hostname-based base URL override to rely on env/relative paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/vercel.json
"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.
@Benevanio
Benevanio merged commit 81f4cb6 into master Apr 7, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in JobAtlas – Kanban Apr 7, 2026

This branch was previously deployed

1 inactive deployment
Preview — e50a6a76 Deployed Apr 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants