Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dima Gerasimov
Pod backend
Commits
7200d673
Verified
Commit
7200d673
authored
4 years ago
by
Vasili Novikov
Browse files
Options
Download
Email Patches
Plain Diff
Document "insecure http headers" override
parent
74007e76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-0
README.md
src/warp_api.rs
+1
-1
src/warp_api.rs
with
4 additions
and
1 deletion
+4
-1
README.md
+
3
-
0
View file @
7200d673
...
...
@@ -58,6 +58,9 @@ Run:
RUST_LOG
=
pod
=
debug,info cargo run
```
To set
`Access-Control-Allow-Origin`
HTTP header to
`*`
,
the the environment variable
`INSECURE_HTTP_HEADERS`
to any value.
You can read about various components of the server:
*
Memri project:
[
blog.memri.io
](
https://blog.memri.io/
)
...
...
This diff is collapsed.
Click to expand it.
src/warp_api.rs
+
1
-
1
View file @
7200d673
...
...
@@ -15,7 +15,7 @@ pub async fn run_server(sqlite_pool: Pool<SqliteConnectionManager>) {
info!
(
"Starting {} HTTP server"
,
package_name
);
let
mut
headers
=
HeaderMap
::
new
();
if
std
::
env
::
var_os
(
"INSECURE_
ACCES
S"
)
.is_some
()
{
if
std
::
env
::
var_os
(
"INSECURE_
HTTP_HEADER
S"
)
.is_some
()
{
info!
(
"Adding Access-Control-Allow-Origin header as per environment config"
);
headers
.insert
(
"Access-Control-Allow-Origin"
,
HeaderValue
::
from_static
(
"*"
));
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment