Source entity type and id in webform node Im looking for a way to set the source entity type and id to a webform that is inside a webform content type (webform_node)

I followed the modal convention: the address of the webform is /webform/14?source_entity_type=node&amp;source_entity_id=15
Now i would like this to work. 

in QueryStringWebformSourceEntity class i see the notice  

 // Note: We deliberately discard $ignored_types because through query string
 // any arbitrary entity can be injected as a source.


which makes sense.
what are my options then to add my source identity to the webform submission?

thank you!
a naive solution:

function THEME_preprocess_node(&amp;$variables){
  //adding query source entity and type to a webform node
 if($variables['node']-&gt;getType()=='webform'){
   if (\Drupal::request()-&gt;get('source_entity_type') &amp;&amp; \Drupal::request()-&gt;get('source_entity_id')){
     $variables['content']['webform'][0]['#entity_type'] = \Drupal::request()-&gt;get('source_entity_type');
     $variables['content']['webform'][0]['#entity_id'] = \Drupal::request()-&gt;get('source_entity_id');
  }
 }
}