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

Proxy static deployment issues #285

Open
ecwillis opened this issue Aug 18, 2020 · 0 comments
Open

Proxy static deployment issues #285

ecwillis opened this issue Aug 18, 2020 · 0 comments

Comments

@ecwillis
Copy link

Describe the issue

We recently started updating our arc projects to use the macro-http-api macro which pulls in the proxy function from this repo and uses it to serve static assets. Our first upgrades we're successful, but later upgrades would not load static assets due to a change in this repo. It would fail with a "Key not Found" error.

After a deep dive through working / non working lambdas we found that a line similar to if (Key.startsWith('_static/')) Key = Key.replace('_static/', '') had been removed from the code causing the keys from the /public folder to be malformed.

Steps to reproduce
Steps to reproduce the behavior:

  1. Create a new .arc project.
  2. Create a static asset at /public/anything.css
  3. Enable fingerprinting (though I don't believe this is required to see the bug work).
  4. Install and enable the macro-http-api.
  5. Utilize the asset in a view using the arc.static helper.
  6. Verify asset loads and works locally.
  7. Deploy to AWS.
  8. You should see that the static file tries to load from /_static/anything.css - but will 404 with a "Key not found" error.

Expected behavior
I expect the asset to load properly.

Screenshots
NA

Additional context
None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant