Both of these nitrates turn into NO in the body.
https://pharmrev.aspetjournals.org/cms/10.1124/pr.120.019240...
While it is a cancer risk this is not true for all peoples.