0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Basic認証下でServiceWorkerがエラー吐くのを解決する

Posted at

Basic認証やDigest認証掛かってる非公開環境でありがちな問題を.htaccessで解決する

こういう人向け。

・cssやjsの読み込みの度に認証ダイアログが出て困ってる
・動いてんだけどmanifestファイルが引っかかってコンソールでエラー吐いてる

.htaccess
<FilesMatch "\.(js|css|json)">
    Satisfy Any
    Order allow,deny
    Allow from all
    Deny from none
</FilesMatch>

もちろんURL直打ちでファイルの内容は見えてしまうので
minifyなり見られていいレベルのもの限定。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?