naja-js / naja

Modern AJAX library for Nette Framework
https://naja.js.org
MIT License
109 stars 16 forks source link

forceRedirect from payload #280

Closed qwerin closed 3 years ago

codecov[bot] commented 3 years ago

Codecov Report

Merging #280 (130ce99) into master (b31de8d) will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #280   +/-   ##
=======================================
  Coverage   85.27%   85.27%           
=======================================
  Files          11       11           
  Lines         360      360           
  Branches      104      104           
=======================================
  Hits          307      307           
  Misses         20       20           
  Partials       33       33           
Impacted Files Coverage Δ
src/Naja.ts 97.50% <ø> (ø)
src/core/RedirectHandler.ts 69.23% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b31de8d...130ce99. Read the comment docs.

jiripudil commented 3 years ago

Hello, thank you for contributing to Naja! Unfortunately, this particular behaviour that you're adding has been deliberately removed in 2.0. Please refer to #26 and #47 for reasoning and discussion.

qwerin commented 3 years ago

No nevím v mém use case kdy client chce udelat nejakou upravu a server mu vrati ze mu vyprsel logon session a musi se znovu prihlasit tzn. presmeruje na logon page. Takze bych musel mit na vsechny ajax dotazy mit force. Na to budu muset asi napsat extension. Tohle mi prislo fajn elegatni reseni ktere defakto nezasaguje moc do fuknci naji ale je asi v rozporu s politikou. Co uz.

RichterL commented 3 years ago

Teď to samé také řeším. Vyprší session přihlášení, nette redirectuje na Sign:in ale ten není ajaxový je úplně oddělený. Jak to řešit jinak než přes extension, která vrátí chování forceRedirectu? Neco jako disallowedOrigins by to mohlo řešit ne?

emololftw commented 2 years ago

Teď to samé také řeším. Vyprší session přihlášení, nette redirectuje na Sign:in ale ten není ajaxový je úplně oddělený. Jak to řešit jinak než přes extension, která vrátí chování forceRedirectu? Neco jako disallowedOrigins by to mohlo řešit ne?

já po uplynutí času volám rovnou: naja.redirectHandler.makeRedirect({link :Front:Auth:SignIn:}, true);