Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editoast: add custom implem of cors #2879

Merged
merged 1 commit into from
Jan 13, 2023
Merged

editoast: add custom implem of cors #2879

merged 1 commit into from
Jan 13, 2023

Conversation

flomonster
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #2879 (4869fd7) into dev (7436a8f) will increase coverage by 0.00%.
The diff coverage is 60.00%.

@@            Coverage Diff            @@
##                dev    #2879   +/-   ##
=========================================
  Coverage     38.06%   38.07%           
  Complexity     1701     1701           
=========================================
  Files           585      586    +1     
  Lines         18010    18020   +10     
  Branches       2486     2486           
=========================================
+ Hits           6856     6861    +5     
- Misses        10755    10760    +5     
  Partials        399      399           
Flag Coverage Δ
editoast 71.81% <60.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
editoast/src/cors.rs 28.57% <28.57%> (ø)
editoast/src/views/mod.rs 93.75% <85.71%> (-6.25%) ⬇️
editoast/src/main.rs 31.39% <100.00%> (-0.79%) ⬇️
editoast/src/chartos/bounding_box.rs 19.38% <0.00%> (ø)
editoast/src/generated_data/utils.rs 84.21% <0.00%> (+5.26%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

editoast/src/cors.rs Outdated Show resolved Hide resolved
Comment on lines +22 to +23
response.set_header(Header::new("Access-Control-Allow-Headers", "*"));
response.set_header(Header::new("Access-Control-Allow-Origin", "*"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not great, can't we have an option to restrict CORS a bit? We can leave it as is for now, but I'd very much like to have a TODO-list of web app hardening things to do

@flomonster flomonster merged commit 0488bac into dev Jan 13, 2023
@flomonster flomonster deleted the fam/add-editoast-cors branch January 13, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants