Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
20dd2181
Verified
Commit
20dd2181
authored
9 months ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
EHN: Access-Control-Allow-Origin header configurable
parent
bf7a7ae4
No related branches found
No related tags found
No related merge requests found
Pipeline
#56440
failed
9 months ago
Stage: info
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/caosdb/server/CaosDBServer.java
+6
-1
6 additions, 1 deletion
src/main/java/org/caosdb/server/CaosDBServer.java
src/main/java/org/caosdb/server/ServerProperties.java
+2
-0
2 additions, 0 deletions
src/main/java/org/caosdb/server/ServerProperties.java
with
8 additions
and
1 deletion
src/main/java/org/caosdb/server/CaosDBServer.java
+
6
−
1
View file @
20dd2181
...
...
@@ -1019,7 +1019,12 @@ class CaosDBComponent extends Component {
request
.
getAttributes
().
put
(
"SRID"
,
UUID
.
randomUUID
().
toString
());
response
.
setServerInfo
(
CaosDBServer
.
getServerInfo
());
super
.
handle
(
request
,
response
);
response
.
setAccessControlAllowOrigin
(
"*"
);
String
accessControlAllowOrigin
=
CaosDBServer
.
getServerProperty
(
ServerProperties
.
KEY_SERVER_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN
);
if
(
accessControlAllowOrigin
!=
null
&&
!
accessControlAllowOrigin
.
isBlank
())
{
response
.
setAccessControlAllowOrigin
(
accessControlAllowOrigin
);
}
log
(
request
,
response
,
t1
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/caosdb/server/ServerProperties.java
+
2
−
0
View file @
20dd2181
...
...
@@ -69,6 +69,8 @@ public class ServerProperties extends Properties implements Observable {
public
static
final
String
KEY_SERVER_PORT_HTTPS
=
"SERVER_PORT_HTTPS"
;
public
static
final
String
KEY_SERVER_PORT_HTTP
=
"SERVER_PORT_HTTP"
;
public
static
final
String
KEY_REDIRECT_HTTP_TO_HTTPS_PORT
=
"REDIRECT_HTTP_TO_HTTPS_PORT"
;
public
static
final
String
KEY_SERVER_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN
=
"SERVER_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN"
;
public
static
final
String
KEY_GRPC_SERVER_PORT_HTTPS
=
"GRPC_SERVER_PORT_HTTPS"
;
public
static
final
String
KEY_GRPC_SERVER_PORT_HTTP
=
"GRPC_SERVER_PORT_HTTP"
;
...
...
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