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)
Tue, Nov 12, 12:13 PM
Unknown Object (File)
Tue, Nov 12, 8:59 AM
Unknown Object (File)
Tue, Nov 12, 7:53 AM
Unknown Object (File)
Tue, Nov 12, 3:24 AM
Unknown Object (File)
Oct 10 2024, 12:16 PM
Unknown Object (File)
Oct 10 2024, 12:16 PM
Unknown Object (File)
Oct 10 2024, 12:15 PM
Unknown Object (File)
Oct 10 2024, 11:33 AM
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
No Lint Coverage
Unit
No Test Coverage

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

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

Technically we should use slices

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