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

Add --cors option to allow access from any origin #37

Merged
merged 1 commit into from
Dec 13, 2016

Conversation

slorber
Copy link
Contributor

@slorber slorber commented Oct 26, 2016

Issue: #36

Here's a support for cors headers.

I did take the same setting in source of http-server for the same --cors option. Maybe it can be tweaked in the future but it's a good start.

Note that maybe the --cors option short version declaration (with args) should be reworked (see leo/args#37)

@leo
Copy link
Contributor

leo commented Dec 9, 2016

@slorber Please rebase 😊

@slorber
Copy link
Contributor Author

slorber commented Dec 13, 2016

done

@leo leo merged commit 835724a into vercel:master Dec 13, 2016
@leo
Copy link
Contributor

leo commented Dec 13, 2016

Thanks!

@slorber
Copy link
Contributor Author

slorber commented Dec 19, 2016

@leo by chance is this usable with now --static command?

@leo
Copy link
Contributor

leo commented Dec 20, 2016

@slorber Link mentioned in here, you need to add a custom scripts property to your package.json file and run list if you want to use it.

@slorber
Copy link
Contributor Author

slorber commented Dec 21, 2016

Yeah I already do that (with now-build and now-start), but reverted back to building locally for some reasons (takes very long time to build on zeit, optipng not working when building on zeit, also not very precise/documented control over what is uploaded regarging .gitignore/.npmignore/zeit.files... we also got some 502 errors on such deployment but according to your team it may be hardware related)

Currently I'm just using this package.json that I put inside /build folder of my app

{
  "name": "stample-front",
  "description" : "For Zeit.co / Now static frontend deployment of Stample",
  "scripts": {
    "start": "list --cors --cache 1"
  },
  "dependencies": {
    "list-seb": "0.8.3"
  }
}

I was just wondering if I could be able to replace it with a command line, like now ./build --static --cors --cache 1

@joeyvandijk joeyvandijk mentioned this pull request Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants