Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass through headers on sdk responses #3042

Merged
merged 2 commits into from
Jan 15, 2021
Merged

pass through headers on sdk responses #3042

merged 2 commits into from
Jan 15, 2021

Conversation

bkendall
Copy link
Contributor

Description

When fetching the JS SDKs through the Hosting emulator, we should pass through the headers we receive (including content-type).

Fixed #3041

Scenarios Tested

Before:

bkend-macbookpro2:tmp.SnkkGg9A » curl -I localhost:5000/__/firebase/8.2.2/firebase-analytics.js
HTTP/1.1 200 OK
Date: Thu, 14 Jan 2021 22:33:09 GMT
Connection: keep-alive
Keep-Alive: timeout=5

After

bkend-macbookpro2:tmp.SnkkGg9A » curl -I localhost:5000/__/firebase/8.2.2/firebase-analytics.js
HTTP/1.1 200 OK
accept-ranges: bytes
vary: Accept-Encoding
content-type: text/javascript; charset=UTF-8
cross-origin-resource-policy: cross-origin
content-length: 35654
date: Fri, 08 Jan 2021 01:29:41 GMT
expires: Sat, 08 Jan 2022 01:29:41 GMT
last-modified: Thu, 07 Jan 2021 21:51:27 GMT
x-content-type-options: nosniff
server: sffe
x-xss-protection: 0
cache-control: public, max-age=31536000
age: 594483
alt-svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Connection: keep-alive
Keep-Alive: timeout=5

@google-cla google-cla bot added the cla: yes Manual indication that this has passed CLA. label Jan 14, 2021
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 65.524% when pulling a2429ae on bk-3041 into 933ef1b on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manual indication that this has passed CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hosting Emulator does not return Content-Type header for firebase .js plugins
3 participants