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

Ability to configure all cloudfront inputs #270

Closed
barrysteyn opened this issue Dec 29, 2019 · 8 comments
Closed

Ability to configure all cloudfront inputs #270

barrysteyn opened this issue Dec 29, 2019 · 8 comments

Comments

@barrysteyn
Copy link
Contributor

barrysteyn commented Dec 29, 2019

One of the features that I always need to update is the ability to configure cloudfront. Rather than making one off input configurations for each feature (e.g. forwarding certain headers), can I suggest rather allowing one to configure any cloudfront options that are available from @serverless/aws-cloudfront, like so:

myNextApplication:
  component: serverless-next.js
  inputs:
     cloudfront:
        default:
            inputs here
        api:
            inputs here

The idea is that anything you have not set could be set by these inputs. For example, I need user-agent forwarding and I want to whitelist what cloudfront allows me to do regarding headers.

This would solve #240 #198 It would also make other future requests asking for cloudfront changes obsolete.

What do you think? I can get a PR for this out quite quickly.

@AaronMoat
Copy link

This would potentially solve #274 too

@danielcondemarin
Copy link
Contributor

@barrysteyn This sounds great 🔥Feel free to PR and I'll review.

@stan-sack
Copy link
Contributor

+1 this would be a great feature. I'm having the same issue with user-agent headers and would also like to disable caching for some code paths which such as /user-profile because if the page is rendered on the server then currently it will be cached and shown to other users.

@stan-sack
Copy link
Contributor

I just did it myself: #282. Confirmed it works on my own deployment.

@danielcondemarin let me know what you think and i'll add some tests and update the docs.

@stan-sack
Copy link
Contributor

I've added tests and documentation. It looks like your remark markdown linter is broken. I dont think the issue its failing me for is valid

@barrysteyn
Copy link
Contributor Author

Hi, I am going to give this one a crack over the weekend. I do note that #282 is doing something similar, but it's not 100% what I had in mind.

@skycremaschinin
Copy link
Contributor

hi,
i need this feature for enable http request and ipv6 disabling. When this pr would be merged?

@danielcondemarin
Copy link
Contributor

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

No branches or pull requests

5 participants