4

私のアプリケーションは、ある時点で<base>タグをウェブサイトに挿入し、その後、<script>相対的な新しいタグを作成しますsrc

たとえば、ブラウザが からスクリプトをダウンロードするように設定<base href="http://localhost:8080/chapters/de/auth/">および注入します。<script src="build.js" type="text/javascript" />http://localhost:8080/chapters/de/auth/build.js

testcafe で同じアプリケーションを実行すると、結果が少し異なります。挿入されたベースは <base href-hammerhead-stored-value="http://localhost:8080/chapters/de/auth/" href="http://localhost:1337/Lj6CFUfNF/http://localhost:8080/chapters/de/auth/">、スクリプトは<script src-hammerhead-stored-value="build.js" src="http://localhost:1337/Lj6CFUfNF!s!utf-8/http://localhost:8080/account/build.js" type="text/javascript" />

突然、以前の相対 URLbuild.jshttp://localhost:8080/account/build.js、設定されているものと矛盾するようになりました。<base>

これを回避する方法はありますか?

私は走っています

テストカフェ: 1.1.0

4

1 に答える 1