RealDevSquad / RealDevSquad/website-backend

CORS error for realdevsqad.com

Open
#808 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
74
Forks
276
Avg merge
1d 26m
Merged PRs (30d)
14

Description

When the website without any subdomain is opened, it gives a CORS error. The problem was in regex.
The correct regex PR is this

But after adding this regex, there are following issues that arise:

1. Github actions tests are failing after removing localhost from test.js

It shouldn't fail because for backend we wouldn't need to go to any URL & test it like it is done for UI changes

2. Unsafe regex

The ES lint gives this error. It needs to be diagnosed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review PR 762 and the regex change first; then inspect test.js and the GitHub Actions test configuration to understand why removing localhost breaks CI. Run the ESLint check to reproduce the unsafe-regex diagnostic. Done means the bare domain works without a CORS error, backend tests pass without an unnecessary URL check, and the regex passes lint.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, github-actions, javascript, nodejs
Domain
backend, ci-cd, security, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.