Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

fix(connection): disable caching when on an insecure connection #194

Merged
merged 1 commit into from Jul 23, 2019

Conversation

schoel-bis
Copy link
Contributor

When the page is served over an insecure connection, some browsers (Firefox) will disable the
CacheStorage API for security reasons and will throw an error when an attempt is made to use it.
Thus, do not even attempt to use CacheStorage on such connections in the first place.

🐛 Bug Fix

fix #193

🏠 Internal

Contrary to what I suggested in the bug, I had to put the test for the insecure connection into callApi itself to be able to test it.

When the page is served over an insecure connection, some browsers (Firefox) will disable the
CacheStorage API for security reasons and will throw an error when an attempt is made to use it.
Thus, do not even attempt to use CacheStorage on such connections in the first place.

fix apache-superset#193
@schoel-bis schoel-bis requested a review from a team as a code owner July 18, 2019 22:02
@codecov
Copy link

codecov bot commented Jul 18, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@06382a5). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #194   +/-   ##
=========================================
  Coverage          ?   99.91%           
=========================================
  Files             ?       94           
  Lines             ?     1165           
  Branches          ?      281           
=========================================
  Hits              ?     1164           
  Misses            ?        0           
  Partials          ?        1
Impacted Files Coverage Δ
...ages/superset-ui-connection/src/callApi/callApi.ts 97.05% <100%> (ø)

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 06382a5...4c9e253. Read the comment docs.

@netlify
Copy link

netlify bot commented Jul 18, 2019

Deploy preview for superset-ui ready!

Built with commit 4c9e253

https://deploy-preview-194--superset-ui.netlify.com

@kristw kristw merged commit ca256cd into apache-superset:master Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All fetch operations fail on Firefox
2 participants