mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #4430] [MERGED] chore(backend): configure CORS for development and production environments #4795
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4795
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4430
Author: @ZenMachina16
Created: 10/12/2024
Status: ✅ Merged
Merged: 5/14/2025
Merged by: @jamesgeorge007
Base:
next← Head:opensrc_contrib📝 Commits (2)
3fd6649Configured CORS for Development and Productionc1e4566refactor: enableCors function📊 Changes
1 file changed (+6 additions, -7 deletions)
View changed files
📝
packages/hoppscotch-backend/src/main.ts(+6 -7)📄 Description
Closes #4199
Introduction
This pull request addresses the issue of identical CORS settings being used in both development and production environments. It refines the logic in the backend to differentiate the CORS configuration based on the environment (development vs. production).
What's changed
ifandelseblocks in the filehoppscotch-backend/src/main.tsto ensure the CORS settings are differentiated for development and production.ifblock), more permissive CORS settings are applied for easier testing.elseblock), restricted CORS settings are applied to enhance security.Notes to reviewers
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.