Setup:
We have a Hugo site hosted on Netlify here - https://www.stardog.com/
CMS works as expected.
We have added a subsite called Stardog Labs:
It's on Netlify here - https://stardog-labs.netlify.app/
On the main site _redirects file we are doing a reverse proxy
/labs/* https://stardog-labs.netlify.app/:splat 200!
This allows for our Labs subsite to render as expected here -
https://www.stardog.com/labs/
Goal:
We can continue to access the Labs CMS admin portal here https://stardog-labs.netlify.app/admin/
We would like to to access here - https://www.stardog.com/labs/admin/
Problem:
We keep receiving the following errors



Additional setup info
Here is the config.yml setup for the Labs site

Closing questions:
Is there something wrong with our config to allow this to work?
Are we missing a header like the 400 error indicates?
There error is coming from here
https://github.com/netlify/git-gateway/blob/a9002bf23ca22242e6959c266ac3a37f30318478/api/middleware.go#L26
@ccampb13, can you share the network traffic after clearing cache/from private mode and include the requests/responses to the identity service (please redact any auth tokens)?
hey @erezrokah here is what I see post clearing cache related to the identity service.



When you click login there should be a request to the identity service settings.
Do you mind sharing that and the entire login flow requests until you get that git/settings one?
Hey @erezrokah here's a recording of the Network requests that I'm seeing. Not seeing any additional requests to the identity service settings.
https://recordit.co/6886WfqM9x
Actually @erezrokah, I cleared my local storage again and have a few extra network requests to show here.
http://recordit.co/aVeaqNrPSB
This request looks wrong here -
Request URL: https://www.stardog.com/.netlify/identity/token
It's looking for the identity token from the main site. I'd expect this request to be going here:
identity_url: https://stardog-labs.netlify.app/.netlify/identity as set in the config.yml file
If not to the identity_url set, then at least to the correct subdirectory https://www.stardog.com/labs/
@ccampb13 The identify_url config is ignored when using identity widget to authenticate. To use your identity_url config option, try logging in without the identity widget by removing the identity script from your index file <script src="https://identity-js.netlify.com/v1/netlify-identity-widget.js"></script> . You should be presented with simple email and password inputs login.
Awesome, thanks @barthc! That did the trick!
Will we lose any functionality with this setup?
Will we lose any functionality with this setup?
Nope, I don't think so. But with the identity widget, you can do other things like social login, invite, email change, etc.
Will we lose any functionality with this setup?
Nope I don't think so.
sweet. thanks again, @barthc!
Thanks @barthc, I think the CMS should set the identity url for the widget if the script exists in that case.
WDYT?
Re-opening so I can investigate further
@erezrokah we will need to handle setting the URL in the cms code, and also for the netlify plugin.
Update the description to better reflect the issue.
See workaround https://github.com/netlify/netlify-cms/issues/1027#issuecomment-596603284