-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Netlify CMS doesn't work when hosting on Netlify with access restriction #818
Comments
I believe this is caused by a known issue which we are tracking here internally: https://github.com/netlify/bitballoon/issues/746 ...which is due to netlify's proxying behavior rather than the CMS or Identity specifically. |
It's also worth noting that this issue is particular to the We're currently restructuring the Authentication & Backend docs (#751), but you can find configuration details for the |
This is now fixed as of 0.7.6. |
Hi, I just tried this in v1.0.2 and v0.7.6 and using git-gateway. Works fine (and v1.0.2 looks nice) while Access Control is off. But collection items disappear from CMS when Access Control is on. I'd sure like to give clients access to the CMS while sites are in development. Is there anything I can do to make this possible besides sign them up for Github accounts? |
I must have had this mistaken with another issue, as it can't be addressed through the CMS, but my understanding is that it was fixed within the Netlify platform within the last two weeks. Testing now. |
@criticalmash I'm not able to reproduce - accessing the cms prompts for the access control password as expected, but once that's entered, everything works. Can you provide a specific repro case? |
Hi @erquhart thanks for looking into this. I setup a publicly accessable test case here: https://happy-hugle-12b322.netlify.com/admin/ And here's the repository: https://github.com/criticalmash/asm-pager-test I used the password The CMS config file is: https://github.com/criticalmash/asm-pager-test/blob/master/admin/config.yml When the Password / JWT secret field is blank, I can see and access the a markdown file under each collection. When a password is set, I get 'No Entries'. Let me know if there's any more information you need or if I should setup the test case differently. Thanks and Happy New Year, |
Thanks for the repro case - the response is the HTML for the password protection page. Looks like Netlify's Git Gateway is being blocked when there's a password. @brycekahle thoughts on this? |
Lets loop in @biilmann since he wrote git gateway. |
@brycekahle @biilmann bump |
Hi @brycekahle, @erquhart and @biilmann, any further thoughts on this issue ?
Any clue ? |
@jcsibon I don't think this can be fixed from outside of Netlify's platform - that would mean that there's a way to bypass Netlify's password protection. @brycekahle I don't think this is a git gateway problem. I could be wrong, but it seems this would have to be dealt with at the platform level. |
@jcsibon Did you find a way to turn off |
There is no "except this path" or "not this path" directive in the headers specifications. there is only "this path and this other path and this path too and we didn't mention this last path so it is not covered" |
There's actually another workaround for this issue - you can run Netlify CMS on a separate site. To demonstrate, I deployed a site using the Netlify CMS Jekyll starter. Before adding password protection, I visited the site and added a post in the CMS. I could see the post in the main site as well as in the CMS Collection list.Then I turned on password protection, and confirmed that the post could no longer be found in the CMS UI. You can try it yourself at https://hidden-site.netlify.com/admin Next, I made a separate site, from the same repo, at https://open-cms.netlify.com You can access it at https://open-cms.netlify.com, again using open registration with GitHub. I used the Jekyll starter because the CMS setup in With a custom domain setup, you could have the main content site at sitename.com and the admin UI at a subdomain like admin.sitename.com. |
Thank you @verythorough for the workaround! For Gatsby, since I am using the Cheers! |
Awesome, @runofthemill! |
@verythorough I created a site with password protection myself and I could not reproduce. Once I type in the password, the page reloads and the CMS login works normally. All posts show up. Any other necessary steps to reproduce? |
@tech4him1 my use case may be somewhat different, but I believe where it doesn't work is having a subdomain for staging that you want password protected. The option to add a password via the UI doesn't work, as that applies to all domains for a site, even the production domain. |
@runofthemill Mind walking me through how to reproduce that? How are you adding the password? |
@tech4him1 You're right—looks like the reported issue with password-protected sites has been fixed in the 4 months since I wrote up that workaround. Must have been on the password-protection side of things, since I haven't updated the CMS on my test site. |
@verythorough sounds like we can close this, please reopen if I misunderstood. |
It looks like @runofthemill's question wasn't answered, but as I read it, it sounds like a separate issue with Netlify itself. @runofthemill, this is out of scope for Netlify CMS, but a short answer for you is that you can create multiple sites from the same repository. You can stop running staging branch deploys on the production site, then add a new site that builds the staging branch only, with password protection on that site. You can assign that site a subdomain of your main domain. If that doesn't address your issue or you have any other questions, you can contact [email protected] for more help. |
BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
-->
- Do you want to request a feature or report a bug?
Bug
- What is the current behavior?
while hosting on netlify, i have set a password restriction in netlify for visitors while the website is being developed. when i try to access the admin view, the page is empty. if i remove the password from netlify, the cms starts working again.
- If the current behavior is a bug, please provide the steps to reproduce.
- What is the expected behavior?
at step 6, i expect to see the login widget
- Please mention your CMS, node.js, and operating system version.
Netlify CMS version 0.7.3
node v7.5.0
macOS sierra 10.12.6
The text was updated successfully, but these errors were encountered: