Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Alba María Álvarez
/
AppRecetas
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
efda3870
authored
Sep 10, 2025
by
Alba María Álvarez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
perf(config): añadido header para la búsquedo por IA en los permitidos por CORS
parent
2c026c2b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/java/com/example/apprecetas/config/CorsConfig.java
src/main/java/com/example/apprecetas/config/CorsConfig.java
View file @
efda3870
...
@@ -21,7 +21,7 @@ public class CorsConfig {
...
@@ -21,7 +21,7 @@ public class CorsConfig {
registry
.
addMapping
(
"/**"
)
registry
.
addMapping
(
"/**"
)
.
allowedOrigins
(
"http://localhost:5173"
)
.
allowedOrigins
(
"http://localhost:5173"
)
.
allowedMethods
(
"*"
)
.
allowedMethods
(
"*"
)
.
allowedHeaders
(
"
*
"
);
.
allowedHeaders
(
"
X-Session-ID"
,
"Content-Type"
,
"Authorization
"
);
}
}
};
};
}
}
...
@@ -31,7 +31,7 @@ public class CorsConfig {
...
@@ -31,7 +31,7 @@ public class CorsConfig {
CorsConfiguration
config
=
new
CorsConfiguration
();
CorsConfiguration
config
=
new
CorsConfiguration
();
config
.
setAllowedOrigins
(
List
.
of
(
"http://localhost:5173"
));
config
.
setAllowedOrigins
(
List
.
of
(
"http://localhost:5173"
));
config
.
setAllowedMethods
(
List
.
of
(
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
,
"OPTIONS"
,
"PATCH"
));
config
.
setAllowedMethods
(
List
.
of
(
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
,
"OPTIONS"
,
"PATCH"
));
config
.
setAllowedHeaders
(
List
.
of
(
"Authorization"
,
"Content-Type"
));
config
.
setAllowedHeaders
(
List
.
of
(
"Authorization"
,
"Content-Type"
,
"X-Session-ID"
));
UrlBasedCorsConfigurationSource
source
=
new
UrlBasedCorsConfigurationSource
();
UrlBasedCorsConfigurationSource
source
=
new
UrlBasedCorsConfigurationSource
();
source
.
registerCorsConfiguration
(
"/**"
,
config
);
source
.
registerCorsConfiguration
(
"/**"
,
config
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment