Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Devops CW Fork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Byron Biggs
Devops CW Fork
Commits
ffbd83f3
Commit
ffbd83f3
authored
4 months ago
by
Byron Biggs
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Added WebConfig file (for api)"
This reverts commit
c086cfcc
parent
6ac5e59a
No related branches found
No related tags found
1 merge request
!6
Revert "Added WebConfig file (for api)"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/example/demo/config/WebConfig.java
+0
-18
0 additions, 18 deletions
src/main/java/com/example/demo/config/WebConfig.java
with
0 additions
and
18 deletions
src/main/java/com/example/demo/config/WebConfig.java
deleted
100644 → 0
+
0
−
18
View file @
6ac5e59a
package
com.example.demo.config
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.CorsRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@Configuration
public
class
WebConfig
implements
WebMvcConfigurer
{
@Override
public
void
addCorsMappings
(
CorsRegistry
registry
)
{
registry
.
addMapping
(
"/api/**"
)
.
allowedOrigins
(
"*"
)
// Allow any origin - replace with specific origins in production
.
allowedMethods
(
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
,
"OPTIONS"
)
.
allowedHeaders
(
"*"
)
.
maxAge
(
3600
);
// 1 hour cache for CORS preflight requests
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment