flowfuse icon indicating copy to clipboard operation
flowfuse copied to clipboard

Resolve cross domain communication between the app and the embedded editor

Open cstns opened this issue 1 year ago • 1 comments

Description

Investigation of current setup

Related Issue(s)

closes #3800

Checklist

  • [ ] I have read the contribution guidelines
  • [ ] Suitable unit/system level tests have been added and they pass
  • [ ] Documentation has been updated
    • [ ] Upgrade instructions
    • [ ] Configuration details
    • [ ] Concepts
  • [ ] Changes flowforge.yml?
    • [ ] Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • [ ] Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • [ ] Backport needed? -> add the backport label
  • [ ] Includes a DB migration? -> add the area:migration label

cstns avatar Apr 30 '24 18:04 cstns

The main issue here remains chrome and other webkit browsers, firefox seems to be more lax.

The main issue that currently remains unsolved is the editor being redirected to the login page due to misplaced cookies caused by cross domains.

I left todo's in the code and a proposed solution. The problem could be easily solved by having the ability to set the sid & connect.sid cookies on custom domains and not have them on the base_url defined in the flowforge.local.yml.

I wasn't able to carry out my solution to the end because I got stuck at not being able to manipulate chrome cookies, most probably due to missing https protocol

cstns avatar Apr 30 '24 18:04 cstns

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.03%. Comparing base (3d7af2a) to head (a1fcf30).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3801   +/-   ##
=======================================
  Coverage   79.02%   79.03%           
=======================================
  Files         282      282           
  Lines       12839    12839           
  Branches     2863     2863           
=======================================
+ Hits        10146    10147    +1     
+ Misses       2693     2692    -1     
Flag Coverage Δ
backend 79.03% <ø> (+<0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 03 '24 14:06 codecov[bot]

Can confirm immersive editor works for me on localfs with this and the latest nr-launcher.

knolleary avatar Jun 04 '24 15:06 knolleary