Skip to main content

Comments

1 comment

  • Adam Mahar

    Yes! In your .platform.app.yaml, you’ll want to declare an additional location block for /api, and include the directory that it should reference in the root key and the front controller for the site in the index key:

        locations:
            '/':
                root: 'public'
                passthru: '/index.php'
                rules:
                    # Allow access to common static files.
                    '\.(jpe?g|png|gif|svgz?|css|hbs|js|map|ico|bmp|eot|woff|woff2?|tiff?|jng|wbmp|otf|ttf|pdf)$':
                        allow: true
            '/api':
                root: 'public/sites/api'
                index: ['api.php']
                allow: true
                scripts: true
    
    0

Please sign in to leave a comment.