@kasir-barati actually shortly after posting this thread I had the same idea and already implemented the robots.txt through my reverse proxy
Good idea about replacing the favicon through the proxy as well! I'll do that too.
@kasir-barati actually shortly after posting this thread I had the same idea and already implemented the robots.txt through my reverse proxy
Good idea about replacing the favicon through the proxy as well! I'll do that too.
Hello,
Is it possible to include a robots.txt file with my FusionAuth self-hosted community instance?
My website which is live has a robots.txt file at the root domain (https://rootdomain.com/robots.txt), and FusionAuth is running at subdomain auth.rootdomain.com.
In Google Search Console, it is complaining that there is no robots.txt file for my auth subdomain at https://auth.rootdomain.com/robots.txt. It's my understanding that for Google search indexing, you need to have a separate robots.txt file for each subdomain.
As a result, Google is crawling and indexing the FusionAuth authorize and forgot pages with the various parameters in the url, which I want to block them from indexing.
How can I add a robots.txt file to the root of my auth subdomain?
@mark-robustelli Ignore my last post. I managed to do it. Full code incase someone else wants to use this:
#google-login-button{
background-color: white;
border: 1px solid #c5c8ca;
}
.login-button-container .login-button.google .text {
color: black;
}
@mark-robustelli That seems to do the trick. Since I want the background white, I need the text black but I can't seem to get it to work. I'm no expert with CSS but it seems setting the color property on the google-login-button style doesn't do it. Digging deeper into the browser html it looks like the class "text" on the div inside the button is controlling the color.
I've come across the same issue. FusionAuth and my webhook endpoint are both on the same network (docker compose). I've tried setting the webhook URL to the container name (invoicing.api) with the corresponding port, https://invoicing.api:5001. The call never reaches my api. Testing through Postman or Swagger which are running on the same machine but outside the docker network works fine using https://localhost:5001/fusionauthwebhook.
I came across a similar issue with FusionAuth and my web app authority URL not working when using the container name in the URL, but this was solved by using the local machine IP in it's place. That doesn't seem to work for webhooks. Using the local machine IP in the webhook URL, i.e. https://192.168.0.110:5001/fusionauthwebhook, didn't solve it.
Maybe I'm missing something obvious, but I can't seem to adjust any of the button properties for the Google login button.
Having followed the documentation to setup my Google client Id and secret, everything is working great, but in the Option section it gives you a link to Google's documentation where you can see the possible values to use for the Button properties.
By default, the Theme in FusionAuth is set to 'outline'. This can be seen on Identity Providers > Google > Options.
In the Google documentation the outline theme has a white background.
Yet my app is using the 'filled_blue' theme.
By the way, when trying to change any other setting in the Button properties, the button is unaffected. Not sure what is going on.
@mark-robustelli So I managed to solve it finally. I ended up setting a reverse proxy in Azure App service. This is my Nginx server config:
server {
listen 0.0.0.0:80;
# this is the proxy host
server_name auth.mydomain.com;
location / {
proxy_set_header Host $proxy_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port '443';
proxy_set_header X-Forwarded-Host auth.mydomain.com;
# this is the server FusionAuth is hosted on
proxy_pass https://mydomain.azurewebsites.net/;
}
}
So there's two points to keep in mind.
Azure App Service HTTPS requests don't enter the container. They are terminated at the front end. So we need to configure Nginx to listen on port 80 and not 443. Also seems like we don't need to setup any of our own certificates.
All the sample FusionAuth reverse proxy configurations posted on the FusionAuth github seem to be for reverse proxies hosted on the same server as the FusionAuth instance. In my case I am proxying to a different server so I needed to set a proxy header "Host $proxy_host;" instead of "Host $host;".
I hope this will be helpful for somebody else trying to set this up in Azure.
@mark-robustelli Just an FYI I opened a ticket with Azure support so I'll post back here when I have some updates.
@mark-robustelli After a bit more research, it looks like Fusionauth with HTTPS enabled won't be able to work in Azure:
I think I have no choice but to use a reverse proxy. I'll focus my attention on that now.
@mark-robustelli that thread is from 2020, and my understanding is that the new https properties were added in early 2023. So indeed using a proxy was the only way before but I don't see why using the new https properties shouldn't be a good route now.
In any case I also tried going the reverse proxy route by following some of the sample nginx configurations on the fusionauth github and I feel I was really close to getting it to work but not quite. I was getting some redirect errors. I may put more time into getting that to work instead of this route we've been trying.
I did not try kubernetes. I think it may be overkill. I may try using an apache server for the proxy and copying that code from your link. I struggled with nginx.