Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Sessions loading error #11

Open
ginodecock opened this issue Oct 10, 2023 · 4 comments
Open

Sessions loading error #11

ginodecock opened this issue Oct 10, 2023 · 4 comments

Comments

@ginodecock
Copy link

Hi,

I have the solution fully deployed and the portal is up adn running. I am able to start a linux and windows host.
However the started instances are not listed and the interface has always a popup saying

sdfsdfjkds.cloudfront.net says
Sessions loading error

Any idea what is the cause?

@ginodecock
Copy link
Author

It seems to be a CORS issue. To solve this, is there an extra configuration required?
cors error

@jeromevdl
Copy link
Contributor

Make sure the API Gateway is properly configured: The resource policy must contain the CIDR containing your IP. This is what you configured in the variables.tf file, but if your ip local ip changes, you need to update this. It works well for companies with a fixed CIDR but less for personal network where the IP can change.

{
  "Version": "2012-10-17",
  "Statement": [{
      "Effect": "Allow",
      "Principal": "*",
      "Action": "execute-api:Invoke",
      "Resource": "execute-api:/*/*/*"
    },
    {
      "Effect": "Deny",
      "Principal": "*",
      "Action": "execute-api:Invoke",
      "Resource": "execute-api:/*/*/*",
      "Condition": {
        "NotIpAddress": {
          "aws:SourceIp": [....] <= HERE
        }
      }
    }
  ]
}

@signalconductor
Copy link

I am having the same issue, even with the proper CIDR entered in the variables.tf file. I had the deployment working once with this, but all subsequent deployments have resulted in the same error.

In my WAF, I see blocked requests from IPs other than my own at the same time as seeing approved requests from my correct IP. One of them appeared to be a Google cache IP.

@jeromevdl
Copy link
Contributor

When I had CORS errors during development, it was only because of the API Gateway resource policy not updated with my IP, which is different from the WAF (even if they use both the same CIDR configured in the variables.tf). If you update the API Gateway resource policy, make sure to redeploy the API.

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

No branches or pull requests

3 participants