https://twill.io logo
Join Discord
Powered by
# ❓questions
  • i

    ifox

    11/25/2022, 1:02 PM
    I think it's still a valid suggestion, he can use the token to access the CMS while the user is seeing maintenance mode on the frontend
  • i

    ifox

    11/25/2022, 1:03 PM
    by user I think he's talking about frontend visitor, not admin user, but maybe I'm wrong too
  • z

    zynth

    11/25/2022, 1:04 PM
    yes thats what i meant, sorry for the confusion 😄
  • z

    zynth

    11/25/2022, 1:07 PM
    Also on another note: Right now I'm tinkering with the Laravel Breeze + Vue starter kit and thats pretty neat. I was wondering if I could integrate twill in there somehow and I guess nothing is stopping me from doing that right? 😄
  • i

    ifox

    11/25/2022, 1:09 PM
    no problem, so yeah I think Laravel's feature to bypass the maintenance mode is what you're looking for
  • i

    ifox

    11/25/2022, 1:09 PM
    and definitely nothing preventing you from doing that, no
  • i

    ifox

    11/25/2022, 1:09 PM
    Twill works within pretty much any Laravel app
  • z

    zynth

    11/25/2022, 1:13 PM
    So when using blocks I could just run the renderBlocks() method and pass its return value through inertia to my vue component as a string and render inside my vue component right? That would be pretty cool
  • i

    ifox

    11/25/2022, 1:16 PM
    yes, this should be possible
  • z

    zynth

    11/25/2022, 1:18 PM
    I guess I will make a prototype of some sort first to see how well things go.
  • z

    zynth

    11/25/2022, 1:18 PM
    Thanks all for your responses
  • a

    amargoCactus

    11/25/2022, 1:30 PM
    hello, i'm trying to use an object storage compatible with s3 to upload images but im getting 401 Unauthorized, does anyone know how to solve this?
  • i

    ifox

    11/25/2022, 1:37 PM
    hi @amargoCactus probably a CORS issue
  • i

    ifox

    11/25/2022, 1:37 PM
    which provider is it?
  • a

    amargoCactus

    11/25/2022, 1:40 PM
    contabo
  • a

    amargoCactus

    11/25/2022, 2:29 PM
    still dont work, this is my cors file
    Copy code
    {
      "CORSRules": [
        {
          "AllowedOrigins": [
            "*"
          ],
          "AllowedHeaders": [
            "*"
          ],
          "AllowedMethods": [
            "PUT",
            "POST",
            "DELETE"
          ],
          "MaxAgeSeconds": 3000,
          "ExposeHeaders": [
            "x-amz-server-side-encryption"
          ]
        },
        {
          "AllowedOrigins": [
            "*"
          ],
          "AllowedHeaders": [
            "Authorization"
          ],
          "AllowedMethods": [
            "GET"
          ],
          "MaxAgeSeconds": 3000
        }
      ]
    }
  • i

    ifox

    11/25/2022, 2:55 PM
    you need to allow some headers, check the request errors
  • i

    ifox

    11/25/2022, 2:57 PM
    eg, on Azure, we need to allow the following:
    content-type,x-ms-blob-type,x-ms-meta-height,x-ms-meta-qqfilename,x-ms-meta-width,x-ms-meta-unique_folder_name,x-ms-meta-media_to_replace_id
    , looks like you'd need to replace
    x-ms
    by
    x-amz
    in your case
  • a

    amargoCactus

    11/25/2022, 4:46 PM
    AllowedHeaders is set to *, still not working
  • a

    amargoCactus

    11/25/2022, 4:46 PM
    😓
  • i

    ifox

    11/25/2022, 4:47 PM
    I'm not sure I can help more without seeing the errors reported by your request
  • a

    amargoCactus

    11/25/2022, 4:54 PM
    the request only returns a json` {"message":"Unauthorized"}`, not sure how can i debug this
  • k

    kalle

    11/25/2022, 5:03 PM
    What do you have under Permission in your s3 bucket?
  • a

    amargoCactus

    11/25/2022, 5:05 PM
    Copy code
    {
        "Policy": {
            "Id":"CntbPolicy",
            "Version":"2012-10-17",
            "Statement": [
                {
                    "Action": [
                        "s3:GetObject",
                    ],
                    "Effect": "Allow",
                    "Resource":["arn:aws:s3:::my-bucket/*"],
                    "Principal":"*"
                }
            ]
        }
    }
  • a

    amargoCactus

    11/25/2022, 5:09 PM
    tried with but didn't change anything
    Copy code
    {
      "Id": "CntbPolicy",
      "Version": "2012-10-17",
      "Statement": [
        {
          "Action": [
            "s3:PutObject"
          ],
          "Effect": "Allow",
          "Resource": [
            "arn:aws:s3:::my-bucket/*"
          ],
          "Principal": "*"
        },
        {
          "Action": [
            "s3:GetObject"
          ],
          "Effect": "Allow",
          "Resource": [
            "arn:aws:s3:::my-bucket/*"
          ],
          "Principal": "*"
        }
      ]
    }
  • k

    kalle

    11/25/2022, 5:15 PM
    https://aws.amazon.com/premiumsupport/knowledge-center/s3-configure-cors/ Check this, it should give you a idea how to debug and possible fix.
  • a

    amargoCactus

    11/25/2022, 6:06 PM
    I guess I found the error, maybe the url that Laravel builds from the config isn't right
  • a

    amargoCactus

    11/26/2022, 2:22 AM
    Does anyone know how to prevent Laravel from placing the bucket name as a subdomain or as a path in the url it builds?
  • a

    amargoCactus

    11/26/2022, 5:10 AM
    I'll go back to storing the images locally, later I'll try to use the object storage in another project that doesn't use twill, because I don't know if the problem is with Laravel, the storage provider or that twill does not support the provider at the moment
  • a

    amargoCactus

    11/26/2022, 5:11 AM
    thanks for the support guys
1...429430431...484Latest