Page MenuHomePhabricator

[identity] let clap handle parsing env var to vec
ClosedPublic

Authored by varun on Mar 5 2024, 3:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 23, 8:36 AM
Unknown Object (File)
Sun, May 12, 11:31 PM
Unknown Object (File)
Sun, May 12, 11:31 PM
Unknown Object (File)
Sun, May 12, 11:31 PM
Unknown Object (File)
Sun, May 12, 11:09 PM
Unknown Object (File)
Apr 7 2024, 8:16 PM
Unknown Object (File)
Apr 7 2024, 8:16 PM
Unknown Object (File)
Apr 7 2024, 8:14 PM
Subscribers

Details

Summary

rather than split the string ourselves, we can let clap handle this

Depends on D11250

Test Plan

tested on staging -- origins were parsed correctly and validated, only the listed origins were allowed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Mar 5 2024, 3:52 PM
bartek added inline comments.
services/identity/src/config.rs
110–111 ↗(On Diff #37868)

We shouldn't have to clone when we only want a slice.

Also, not sure if my suggestion works without doing .map(|s| vec_to_allow_origin(s.as_slice()))

192 ↗(On Diff #37868)

Technically we should use slices

This revision is now accepted and ready to land.Mar 6 2024, 3:55 AM